diff options
Diffstat (limited to 'ARMInterpreter_Branch.cpp')
-rw-r--r-- | ARMInterpreter_Branch.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ARMInterpreter_Branch.cpp b/ARMInterpreter_Branch.cpp new file mode 100644 index 0000000..4555235 --- /dev/null +++ b/ARMInterpreter_Branch.cpp @@ -0,0 +1,27 @@ +#include "ARM.h" + + +namespace ARMInterpreter +{ + + +s32 A_B(ARM* cpu) +{ + s32 offset = (s32)(cpu->CurInstr << 8) >> 6; + cpu->JumpTo(cpu->R[15] + offset); + + return C_S(2) + C_N(1); +} + +s32 A_BL(ARM* cpu) +{ + s32 offset = (s32)(cpu->CurInstr << 8) >> 6; + cpu->R[14] = cpu->R[15] - 4; + cpu->JumpTo(cpu->R[15] + offset); + + return C_S(2) + C_N(1); +} + + +} + |