mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -06:00
well, adding shit. laying out the base for the interpreter. really dirty code.
This commit is contained in:
27
ARMInterpreter_Branch.cpp
Normal file
27
ARMInterpreter_Branch.cpp
Normal file
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user