diff options
author | WaluigiWare64 <68647953+WaluigiWare64@users.noreply.github.com> | 2020-08-05 15:06:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-05 15:06:15 +0100 |
commit | 6d71f9c83293006b02a96ce0f5a5f9f65a47cd18 (patch) | |
tree | 5558a3a2ae148e7e17fdd56ab0296b883da0aa09 /src/ARMJIT_A64/ARMJIT_ALU.cpp | |
parent | 7e5eafe345017dc93a68572528e896f896a6e175 (diff) | |
parent | e4b1526b477bc66996bce8f0a2f81c2f1cffba63 (diff) |
Merge branch 'master' into feature/zip-support
Diffstat (limited to 'src/ARMJIT_A64/ARMJIT_ALU.cpp')
-rw-r--r-- | src/ARMJIT_A64/ARMJIT_ALU.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ARMJIT_A64/ARMJIT_ALU.cpp b/src/ARMJIT_A64/ARMJIT_ALU.cpp index 5f021a0..26a89cb 100644 --- a/src/ARMJIT_A64/ARMJIT_ALU.cpp +++ b/src/ARMJIT_A64/ARMJIT_ALU.cpp @@ -434,6 +434,19 @@ void Compiler::A_Comp_GetOp2(bool S, Op2& op2) if (CurInstr.Instr & (1 << 25)) { Comp_AddCycles_C(); + + u32 shift = (CurInstr.Instr >> 7) & 0x1E; + u32 imm = ROR(CurInstr.Instr & 0xFF, shift); + + if (S && shift && (CurInstr.SetFlags & 0x2)) + { + CPSRDirty = true; + if (imm & 0x80000000) + ORRI2R(RCPSR, RCPSR, 1 << 29); + else + ANDI2R(RCPSR, RCPSR, ~(1 << 29)); + } + op2 = Op2(ROR(CurInstr.Instr & 0xFF, (CurInstr.Instr >> 7) & 0x1E)); } else |