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.)
This commit is contained in:
JosJuice 2022-06-12 10:51:21 +02:00
parent 3de49dee78
commit 75e897c40e

View File

@ -243,7 +243,7 @@ protected:
// Store float: X1 Q0 // Store float: X1 Q0
// Load float: X0 // 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. // Otherwise it must be the register listed in the table above.
// //
// Additional scratch registers are used in the following situations: // Additional scratch registers are used in the following situations:
@ -254,9 +254,10 @@ protected:
// emitting_routine && mode != AlwaysSafe && !jo.fastmem_arena: X3 // emitting_routine && mode != AlwaysSafe && !jo.fastmem_arena: X3
// mode != AlwaysSafe && !jo.fastmem_arena: X2 // mode != AlwaysSafe && !jo.fastmem_arena: X2
// !emitting_routine && mode != AlwaysSafe && !jo.fastmem_arena: X30 // !emitting_routine && mode != AlwaysSafe && !jo.fastmem_arena: X30
// !emitting_routine && mode == Auto && jo.fastmem_arena: X30
// //
// mode != AlwaysUnsafe: // Furthermore, any callee-saved register which isn't marked in gprs_to_push/fprs_to_push
// X30 (plus most other registers, unless marked in gprs_to_push and fprs_to_push) // may be clobbered if mode != AlwaysUnsafe.
void EmitBackpatchRoutine(u32 flags, MemAccessMode mode, Arm64Gen::ARM64Reg RS, void EmitBackpatchRoutine(u32 flags, MemAccessMode mode, Arm64Gen::ARM64Reg RS,
Arm64Gen::ARM64Reg addr, BitSet32 gprs_to_push = BitSet32(0), Arm64Gen::ARM64Reg addr, BitSet32 gprs_to_push = BitSet32(0),
BitSet32 fprs_to_push = BitSet32(0), bool emitting_routine = false); BitSet32 fprs_to_push = BitSet32(0), bool emitting_routine = false);