summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2022-06-12 10:51:21 +0200
committerJosJuice <josjuice@gmail.com>2022-06-12 11:03:37 +0200
commit75e897c40edad489da1f378d79b0c7f2eb39e154 (patch)
treebce08c64ee0650d4aea1b65dcd825a47ae56f186 /Source/Core
parent3de49dee78be9d12b9caf7cd20a39613dcc35125 (diff)
JitArm64: Fix a minor mistake in the EmitBackpatchRoutine comment
X30 is used in fewer situations than the comment was claiming. (I think that when I wrote the comment I was counting the use of X30 as a temp variable in the slowmem code as clobbering X30, but that happens after pushing X30, so it doesn't actually get clobbered.)
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/JitArm64/Jit.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/Core/PowerPC/JitArm64/Jit.h b/Source/Core/Core/PowerPC/JitArm64/Jit.h
index 5a7d84b151..ad21fe1988 100644
--- a/Source/Core/Core/PowerPC/JitArm64/Jit.h
+++ b/Source/Core/Core/PowerPC/JitArm64/Jit.h
@@ -243,7 +243,7 @@ protected:
// Store float: X1 Q0
// Load float: X0
//
- // If using MemAccessMode::AlwaysUnsafe, the addr argument can be any register.
+ // If mode == AlwaysUnsafe, the addr argument can be any register.
// Otherwise it must be the register listed in the table above.
//
// Additional scratch registers are used in the following situations:
@@ -254,9 +254,10 @@ protected:
// emitting_routine && mode != AlwaysSafe && !jo.fastmem_arena: X3
// mode != AlwaysSafe && !jo.fastmem_arena: X2
// !emitting_routine && mode != AlwaysSafe && !jo.fastmem_arena: X30
+ // !emitting_routine && mode == Auto && jo.fastmem_arena: X30
//
- // mode != AlwaysUnsafe:
- // X30 (plus most other registers, unless marked in gprs_to_push and fprs_to_push)
+ // Furthermore, any callee-saved register which isn't marked in gprs_to_push/fprs_to_push
+ // may be clobbered if mode != AlwaysUnsafe.
void EmitBackpatchRoutine(u32 flags, MemAccessMode mode, Arm64Gen::ARM64Reg RS,
Arm64Gen::ARM64Reg addr, BitSet32 gprs_to_push = BitSet32(0),
BitSet32 fprs_to_push = BitSet32(0), bool emitting_routine = false);