diff options
author | bunnei <bunneidev@gmail.com> | 2014-12-19 22:46:56 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-12-19 22:46:56 +0100 |
commit | 245abb412501e231aee2fef5ffa96e728250edbb (patch) | |
tree | 8b6144c1fdc3664d9f4ecff5a1e986e0dc6cb2ac /src/core/arm/interpreter | |
parent | Merge pull request #305 from lioncash/paren (diff) | |
parent | armemu: Narrow the scope of some variables in handle_v6_insn (diff) | |
download | yuzu-245abb412501e231aee2fef5ffa96e728250edbb.tar yuzu-245abb412501e231aee2fef5ffa96e728250edbb.tar.gz yuzu-245abb412501e231aee2fef5ffa96e728250edbb.tar.bz2 yuzu-245abb412501e231aee2fef5ffa96e728250edbb.tar.lz yuzu-245abb412501e231aee2fef5ffa96e728250edbb.tar.xz yuzu-245abb412501e231aee2fef5ffa96e728250edbb.tar.zst yuzu-245abb412501e231aee2fef5ffa96e728250edbb.zip |
Diffstat (limited to 'src/core/arm/interpreter')
-rw-r--r-- | src/core/arm/interpreter/armemu.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/core/arm/interpreter/armemu.cpp b/src/core/arm/interpreter/armemu.cpp index 56040a4eb..63cfd03c6 100644 --- a/src/core/arm/interpreter/armemu.cpp +++ b/src/core/arm/interpreter/armemu.cpp @@ -5681,11 +5681,8 @@ L_stm_s_takeabort: /* Attempt to emulate an ARMv6 instruction. Returns non-zero upon success. */ - static int - handle_v6_insn (ARMul_State * state, ARMword instr) { - ARMword lhs, temp; - - switch (BITS (20, 27)) { + static int handle_v6_insn(ARMul_State* state, ARMword instr) { + switch (BITS(20, 27)) { case 0x03: printf ("Unhandled v6 insn: ldr\n"); break; @@ -5719,7 +5716,7 @@ L_stm_s_takeabort: /* strex */ u32 l = LHSReg; u32 r = RHSReg; - lhs = LHS; + u32 lhs = LHS; bool enter = false; @@ -5744,7 +5741,7 @@ L_stm_s_takeabort: case 0x19: /* ldrex */ if (BITS(4, 7) == 0x9) { - lhs = LHS; + u32 lhs = LHS; state->currentexaddr = lhs; state->currentexval = ARMul_ReadWord(state, lhs); @@ -5763,7 +5760,7 @@ L_stm_s_takeabort: case 0x1c: if (BITS(4, 7) == 0x9) { /* strexb */ - lhs = LHS; + u32 lhs = LHS; bool enter = false; @@ -5793,11 +5790,11 @@ L_stm_s_takeabort: case 0x1d: if ((BITS(4, 7)) == 0x9) { /* ldrexb */ - temp = LHS; - LoadByte(state, instr, temp, LUNSIGNED); + u32 lhs = LHS; + LoadByte(state, instr, lhs, LUNSIGNED); - state->currentexaddr = temp; - state->currentexval = (u32)ARMul_ReadByte(state, temp); + state->currentexaddr = lhs; + state->currentexval = (u32)ARMul_ReadByte(state, lhs); //state->Reg[BITS(12, 15)] = ARMul_LoadByte(state, state->Reg[BITS(16, 19)]); //printf("ldrexb\n"); |