summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/arm7/arm7thmb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/arm7/arm7thmb.cpp')
-rw-r--r--src/devices/cpu/arm7/arm7thmb.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/devices/cpu/arm7/arm7thmb.cpp b/src/devices/cpu/arm7/arm7thmb.cpp
index 251e5b16408..0d25d62fcf3 100644
--- a/src/devices/cpu/arm7/arm7thmb.cpp
+++ b/src/devices/cpu/arm7/arm7thmb.cpp
@@ -1557,18 +1557,21 @@ void arm7_cpu_device::tg0e_0(uint32_t pc, uint32_t op)
void arm7_cpu_device::tg0e_1(uint32_t pc, uint32_t op)
{
+ /* BLX (LO) */
+
uint32_t addr = GetRegister(14);
addr += (op & THUMB_BLOP_OFFS) << 1;
addr &= 0xfffffffc;
- SetRegister(14, (R15 + 4) | 1);
+ SetRegister(14, (R15 + 2) | 1);
R15 = addr;
set_cpsr(GET_CPSR & ~T_MASK);
}
- /* BL */
void arm7_cpu_device::tg0f_0(uint32_t pc, uint32_t op)
{
+ /* BL (HI) */
+
uint32_t addr = (op & THUMB_BLOP_OFFS) << 12;
if (addr & (1 << 22))
{
@@ -1581,6 +1584,8 @@ void arm7_cpu_device::tg0f_0(uint32_t pc, uint32_t op)
void arm7_cpu_device::tg0f_1(uint32_t pc, uint32_t op) /* BL */
{
+ /* BL (LO) */
+
uint32_t addr = GetRegister(14) & ~1;
addr += (op & THUMB_BLOP_OFFS) << 1;
SetRegister(14, (R15 + 2) | 1);