aboutsummaryrefslogtreecommitdiff
path: root/opcodes
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1998-03-19 23:51:18 +0000
committerNick Clifton <nickc@redhat.com>1998-03-19 23:51:18 +0000
commitde1b531df3b35e15dd784451a477c93614cd9d52 (patch)
treeaf4d3ad512afb2e16bf4f7d48d28cf85d9aebbe0 /opcodes
parent155d9cc48aa72784409f93ba5362024fe365882b (diff)
downloadgdb-de1b531df3b35e15dd784451a477c93614cd9d52.zip
gdb-de1b531df3b35e15dd784451a477c93614cd9d52.tar.gz
gdb-de1b531df3b35e15dd784451a477c93614cd9d52.tar.bz2
Patches for PR15356 courtesy of Tony Thompson at ARM.
Diffstat (limited to 'opcodes')
-rw-r--r--opcodes/ChangeLog11
-rw-r--r--opcodes/arm-opc.h6
2 files changed, 14 insertions, 3 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 319d8b2..dd887ed 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,14 @@
+Thu Mar 19 15:46:53 1998 Nick Clifton <nickc@cygnus.com>
+
+ These patches are courtesy of Jonathan Walton and Tony Thompson
+ (athompso@cambridge.arm.com).
+
+ * arm-dis.c (print_insn_thumb): Ignore bottom two bits of PC
+ relative addresses.
+
+ * arm-opc.h (thumb_opcodes): Annotate PC relative addresses with
+ both the offset and the label closest to the destination.
+
start-sanitize-r5900
Thu Mar 19 13:53:25 1998 Jeffrey A Law (law@cygnus.com)
diff --git a/opcodes/arm-opc.h b/opcodes/arm-opc.h
index 89623a3..4399137 100644
--- a/opcodes/arm-opc.h
+++ b/opcodes/arm-opc.h
@@ -66,7 +66,7 @@ Thumb specific format options:
%<bitfield>B print Thumb branch destination (signed displacement)
%<bitfield>W print (bitfield * 4) as a decimal
%<bitfield>H print (bitfield * 2) as a decimal
- %<bitfield>a print (bitfield * 4) as a decoded symbol
+ %<bitfield>a print (bitfield * 4) as a pc-rel offset + decoded symbol
*/
/* Note: There is a partial ordering in this table - it must be searched from
@@ -223,7 +223,7 @@ static struct thumb_opcode thumb_opcodes[] =
{0x3000, 0xF800, "add\t%8-10r, #%0-7d"},
{0x3800, 0xF800, "sub\t%8-10r, #%0-7d"},
/* format 6 */
- {0x4800, 0xF800, "ldr\t%8-10r, %0-7a"},
+ {0x4800, 0xF800, "ldr\t%8-10r, [pc, #%0-7W]\t(%0-7a)"}, /* TODO: Disassemble PC relative "LDR rD,=<symbolic>" */
/* format 9 */
{0x6000, 0xF800, "str\t%0-2r, [%3-5r, #%6-10W]"},
{0x6800, 0xF800, "ldr\t%0-2r, [%3-5r, #%6-10W]"},
@@ -236,7 +236,7 @@ static struct thumb_opcode thumb_opcodes[] =
{0x9000, 0xF800, "str\t%8-10r, [sp, #%0-7W]"},
{0x9800, 0xF800, "ldr\t%8-10r, [sp, #%0-7W]"},
/* format 12 */
- {0xA000, 0xF800, "add\t%8-10r, pc, #%0-7W"}, /* TODO: Disassemble PC relative "LDR rD,=<symbolic>" */
+ {0xA000, 0xF800, "add\t%8-10r, pc, #%0-7W\t(adr %8-10r,%0-7a)"},
{0xA800, 0xF800, "add\t%8-10r, sp, #%0-7W"},
/* format 15 */
{0xC000, 0xF800, "stmia\t%8-10r!,%M"},