diff options
author | 2016-12-29 14:34:59 -0800 | |
---|---|---|
committer | 2016-12-29 14:34:59 -0800 | |
commit | 1fafe7706cbfcfc6e39c23c3c713fbb102557cbe (patch) | |
tree | e717407aa8f98f192a2095f28909c89f3af3a8e5 /src/devices/cpu/arm/arm.cpp | |
parent | f7a98c4a969478fca51faf30f588d59631394bd9 (diff) | |
parent | 2b74e4c0be91b86b408fca518af7518c1ea994c9 (diff) |
Merge https://github.com/mamedev/mame
Diffstat (limited to 'src/devices/cpu/arm/arm.cpp')
-rw-r--r-- | src/devices/cpu/arm/arm.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/devices/cpu/arm/arm.cpp b/src/devices/cpu/arm/arm.cpp index eb4de54e86d..884b22896cd 100644 --- a/src/devices/cpu/arm/arm.cpp +++ b/src/devices/cpu/arm/arm.cpp @@ -635,13 +635,7 @@ void arm_cpu_device::HandleMemSingle( uint32_t insn ) rnv = (R15 & ADDRESS_MASK) - off; } - if (insn & INSN_SDT_W) - { - SetRegister(rn,rnv); - if (ARM_DEBUG_CORE && rn == eR15) - logerror("writeback R15 %08x\n", R15); - } - else if (rn == eR15) + if (rn == eR15) { rnv = rnv + 8; } @@ -685,7 +679,7 @@ void arm_cpu_device::HandleMemSingle( uint32_t insn ) In other cases, 4 is subracted from R15 here to account for pipelining. */ - if ((cpu_read32(rnv)&3)==0) + if (m_copro_type == ARM_COPRO_TYPE_VL86C020 || (cpu_read32(rnv)&3)==0) R15 -= 4; m_icount -= S_CYCLE + N_CYCLE; @@ -716,6 +710,18 @@ void arm_cpu_device::HandleMemSingle( uint32_t insn ) } } + /* Do pre-indexing writeback */ + if ((insn & INSN_SDT_P) && (insn & INSN_SDT_W)) + { + if ((insn & INSN_SDT_L) && rd == rn) + SetRegister(rn, GetRegister(rd)); + else + SetRegister(rn, rnv); + + if (ARM_DEBUG_CORE && rn == eR15) + logerror("writeback R15 %08x\n", R15); + } + /* Do post-indexing writeback */ if (!(insn & INSN_SDT_P)/* && (insn&INSN_SDT_W)*/) { |