aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1999-06-04 07:14:10 +0000
committerNick Clifton <nickc@redhat.com>1999-06-04 07:14:10 +0000
commit886796f9fafcfd676a03b35b3b07ab2c94efb43d (patch)
tree843af391a00ee5f96ef1d2d708ac9cd2034d0984 /opcodes
parent5164c3826e490e56fb3f48afb0b3a78ea84f4e3f (diff)
downloadfsf-binutils-gdb-886796f9fafcfd676a03b35b3b07ab2c94efb43d.zip
fsf-binutils-gdb-886796f9fafcfd676a03b35b3b07ab2c94efb43d.tar.gz
fsf-binutils-gdb-886796f9fafcfd676a03b35b3b07ab2c94efb43d.tar.bz2
Make LDRH/LDRB consistent with LDR when target is PC-relative
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog5
-rw-r--r--opcodes/arm-dis.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index d4f8080..3f7b966 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+1999-06-03 Philip Blundell <philb@gnu.org>
+
+ * arm-dis.c (print_insn_arm): Make LDRH/LDRB consistent with LDR
+ when target is PC-relative.
+
1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
* m68k-opc.c: Rename MACL/MSACL to MAC/MSAC. Add MACM/MSACM. Add
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index 4aabf72..5bc1350 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -195,8 +195,12 @@ print_insn_arm (pc, info, given)
{
/* PC relative with immediate offset */
int offset = ((given & 0xf00) >> 4) | (given & 0xf);
+
if ((given & 0x00800000) == 0)
offset = -offset;
+
+ func (stream, "[pc, #%x]\t; ", offset);
+
(*info->print_address_func)
(offset + pc + 8, info);
}