diff options
author | Nick Clifton <nickc@redhat.com> | 2002-05-23 12:38:31 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-05-23 12:38:31 +0000 |
commit | 2984e11475f5f964a106064a31896d6550716ccd (patch) | |
tree | 8e1ebbc14fee93104e624bd70f63afbd41864cd1 /sim/arm/thumbemu.c | |
parent | c62e1cc30f77e49b15d48d4d32c7f6c1e6827163 (diff) | |
download | gdb-2984e11475f5f964a106064a31896d6550716ccd.zip gdb-2984e11475f5f964a106064a31896d6550716ccd.tar.gz gdb-2984e11475f5f964a106064a31896d6550716ccd.tar.bz2 |
When decoding a BLX(1) instruction do not add in the second bit of the base
address - this has already been accounted for.
Diffstat (limited to 'sim/arm/thumbemu.c')
-rw-r--r-- | sim/arm/thumbemu.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sim/arm/thumbemu.c b/sim/arm/thumbemu.c index 4f00733..283e7d5 100644 --- a/sim/arm/thumbemu.c +++ b/sim/arm/thumbemu.c @@ -520,12 +520,8 @@ tdstate ARMul_ThumbDecode (state, pc, tinstr, ainstr) { ARMword tmp = (pc + 2); - /* Bit one of the destination address comes from bit one of the - address of the first (H == 10) half of the instruction, not - from the offset in the instruction. */ state->Reg[15] = ((state->Reg[14] - + ((tinstr & 0x07FE) << 1) - + ((pc - 2) & 2)) + + ((tinstr & 0x07FE) << 1)) & 0xFFFFFFFC); CLEART; state->Reg[14] = (tmp | 1); @@ -538,6 +534,7 @@ tdstate ARMul_ThumbDecode (state, pc, tinstr, ainstr) break; } /* else we fall through to process the second half of the BL */ + pc += 2; /* point the pc at the 2nd half */ case 31: /* BL instruction 2 */ /* Format 19 */ /* There is no single ARM instruction equivalent for this |