diff options
author | Lioncash <mathew1800@gmail.com> | 2015-07-26 11:39:54 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2015-07-26 19:18:32 +0200 |
commit | 0ecc6e2f0421aef95f0dd30466e4c69e15020e83 (patch) | |
tree | fe4f331b08d95df3cae818347b3b94079686e222 /src/core/arm/dyncom/arm_dyncom_run.h | |
parent | Merge pull request #990 from lioncash/arm (diff) | |
download | yuzu-0ecc6e2f0421aef95f0dd30466e4c69e15020e83.tar yuzu-0ecc6e2f0421aef95f0dd30466e4c69e15020e83.tar.gz yuzu-0ecc6e2f0421aef95f0dd30466e4c69e15020e83.tar.bz2 yuzu-0ecc6e2f0421aef95f0dd30466e4c69e15020e83.tar.lz yuzu-0ecc6e2f0421aef95f0dd30466e4c69e15020e83.tar.xz yuzu-0ecc6e2f0421aef95f0dd30466e4c69e15020e83.tar.zst yuzu-0ecc6e2f0421aef95f0dd30466e4c69e15020e83.zip |
Diffstat (limited to 'src/core/arm/dyncom/arm_dyncom_run.h')
-rw-r--r-- | src/core/arm/dyncom/arm_dyncom_run.h | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/core/arm/dyncom/arm_dyncom_run.h b/src/core/arm/dyncom/arm_dyncom_run.h index ef18455bc..13bef17fc 100644 --- a/src/core/arm/dyncom/arm_dyncom_run.h +++ b/src/core/arm/dyncom/arm_dyncom_run.h @@ -20,38 +20,29 @@ #include "core/arm/skyeye_common/armstate.h" -void switch_mode(ARMul_State* core, uint32_t mode); - -// Note that for the 3DS, a Thumb instruction will only ever be -// two bytes in size. Thus we don't need to worry about ThumbEE -// or Thumb-2 where instructions can be 4 bytes in length. -static inline u32 GET_INST_SIZE(ARMul_State* core) { - return core->TFlag? 2 : 4; -} - /** * Checks if the PC is being read, and if so, word-aligns it. * Used with address calculations. * - * @param core The ARM CPU state instance. + * @param cpu The ARM CPU state instance. * @param Rn The register being read. * * @return If the PC is being read, then the word-aligned PC value is returned. * If the PC is not being read, then the value stored in the register is returned. */ -static inline u32 CHECK_READ_REG15_WA(ARMul_State* core, int Rn) { - return (Rn == 15) ? ((core->Reg[15] & ~0x3) + GET_INST_SIZE(core) * 2) : core->Reg[Rn]; +static inline u32 CHECK_READ_REG15_WA(ARMul_State* cpu, int Rn) { + return (Rn == 15) ? ((cpu->Reg[15] & ~0x3) + cpu->GetInstructionSize() * 2) : cpu->Reg[Rn]; } /** * Reads the PC. Used for data processing operations that use the PC. * - * @param core The ARM CPU state instance. + * @param cpu The ARM CPU state instance. * @param Rn The register being read. * * @return If the PC is being read, then the incremented PC value is returned. * If the PC is not being read, then the values stored in the register is returned. */ -static inline u32 CHECK_READ_REG15(ARMul_State* core, int Rn) { - return (Rn == 15) ? ((core->Reg[15] & ~0x1) + GET_INST_SIZE(core) * 2) : core->Reg[Rn]; +static inline u32 CHECK_READ_REG15(ARMul_State* cpu, int Rn) { + return (Rn == 15) ? ((cpu->Reg[15] & ~0x1) + cpu->GetInstructionSize() * 2) : cpu->Reg[Rn]; } |