summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2024-12-27 14:05:54 +0100
committerJosJuice <josjuice@gmail.com>2025-07-27 08:32:44 +0200
commita06bc5417dac625c975338f70f69a1ff86e62fdb (patch)
treed770f97f268c3d74ae60c1144fd3bb0dea81f132 /Source
parent78afea131278577521588332c89e9277547035ad (diff)
JitArm64: Document an assumption we've been making in EmitBackpatchRoutine
The next commit will add another piece of code that depends on this assumption that we've been making. Good opportunity to document it. In practice, all callers of EmitBackpatchRoutine are locking X30.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/PowerPC/JitArm64/Jit.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Core/Core/PowerPC/JitArm64/Jit.h b/Source/Core/Core/PowerPC/JitArm64/Jit.h
index fd5cc4e32e..5554bc6955 100644
--- a/Source/Core/Core/PowerPC/JitArm64/Jit.h
+++ b/Source/Core/Core/PowerPC/JitArm64/Jit.h
@@ -273,8 +273,11 @@ protected:
// !emitting_routine && mode != AlwaysSlowAccess && !jo.fastmem: X30
// !emitting_routine && mode == Auto && jo.fastmem: X30
//
- // Furthermore, any callee-saved register which isn't marked in gprs_to_push/fprs_to_push
- // may be clobbered if mode != AlwaysFastAccess.
+ // Furthermore:
+ // - Any callee-saved register which isn't marked in gprs_to_push/fprs_to_push may be
+ // clobbered if mode != AlwaysFastAccess.
+ // - If !emitting_routine && mode != AlwaysFastAccess && jo.memcheck, X30 must not
+ // contain a guest register.
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);