diff options
author | MerryMage <[email protected]> | 2017-12-02 15:24:10 +0000 |
---|---|---|
committer | MerryMage <[email protected]> | 2020-04-22 20:26:40 +0100 |
commit | 311361b4090f0236bc013f25807427aeba993cb0 (patch) | |
tree | 43f01e72e2da03fd91dfec5546c34593ec5d8aa7 /docs | |
parent | 3cca3bbd0b49c7bc69e32dcdb031a2200a5a7510 (diff) | |
download | dynarmic-311361b4090f0236bc013f25807427aeba993cb0.tar.gz dynarmic-311361b4090f0236bc013f25807427aeba993cb0.zip |
jit_state: Split off CPSR.{E,T}
This allows us to improve code-emission for PopRSBHint. We also improve
code emission other terminals at the same time.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/ReturnStackBufferOptimization.md | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/docs/ReturnStackBufferOptimization.md b/docs/ReturnStackBufferOptimization.md index caf2f423..e5298cad 100644 --- a/docs/ReturnStackBufferOptimization.md +++ b/docs/ReturnStackBufferOptimization.md @@ -26,10 +26,10 @@ computing a 64-bit `UniqueHash` that is guaranteed to uniquely identify a block. u64 LocationDescriptor::UniqueHash() const { // This value MUST BE UNIQUE. // This calculation has to match up with EmitX64::EmitTerminalPopRSBHint - u64 pc_u64 = u64(arm_pc); - u64 fpscr_u64 = u64(fpscr.Value()) << 32; - u64 t_u64 = cpsr.T() ? (1ull << 35) : 0; - u64 e_u64 = cpsr.E() ? (1ull << 39) : 0; + u64 pc_u64 = u64(arm_pc) << 32; + u64 fpscr_u64 = u64(fpscr.Value()); + u64 t_u64 = cpsr.T() ? 1 : 0; + u64 e_u64 = cpsr.E() ? 2 : 0; return pc_u64 | fpscr_u64 | t_u64 | e_u64; } @@ -120,12 +120,10 @@ To check if a predicition is in the RSB, we linearly scan the RSB. using namespace Xbyak::util; // This calculation has to match up with IREmitter::PushRSB - code->mov(ebx, MJitStateCpsr()); code->mov(ecx, MJitStateReg(Arm::Reg::PC)); - code->and_(ebx, u32((1 << 5) | (1 << 9))); - code->shr(ebx, 2); - code->or_(ebx, dword[r15 + offsetof(JitState, FPSCR_mode)]); - code->shl(rbx, 32); + code->shl(rcx, 32); + code->mov(ebx, dword[r15 + offsetof(JitState, FPSCR_mode)]); + code->or_(ebx, dword[r15 + offsetof(JitState, CPSR_et)]); code->or_(rbx, rcx); code->mov(rax, u64(code->GetReturnFromRunCodeAddress())); |