aboutsummaryrefslogtreecommitdiff
path: root/opcodes/arm-dis.c
diff options
context:
space:
mode:
authorMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2010-09-27 09:47:05 +0000
committerMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2010-09-27 09:47:05 +0000
commit6844b2c2db8ce07c7f000d9bd132d6b9b83709b8 (patch)
tree5fcdbc72bb96397a0323bdda04fd5533d4a96d05 /opcodes/arm-dis.c
parenta7cb5251cf141989cc34f39b40641c5359b12757 (diff)
downloadgdb-6844b2c2db8ce07c7f000d9bd132d6b9b83709b8.zip
gdb-6844b2c2db8ce07c7f000d9bd132d6b9b83709b8.tar.gz
gdb-6844b2c2db8ce07c7f000d9bd132d6b9b83709b8.tar.bz2
2010-09-27 Tejas Belagod <tejas.belagod@arm.com>
* gas/config/tc-arm.c (do_neon_ldr_str): Deprecate ARM-mode PC-relative VSTR, issue an error in THUMB mode. * opcodes/arm_dis.c (print_insn_coprocessor): Apply off-by-alignment correction to unaligned PCs while printing comment. * gas/testsuite/gas/arm/vldr.s: New test for pc-relative VLDR disassembly comment. * gas/testsuite/gas/arm/vldr.d: Likewise. * gas/testsuite/gas/arm/vstr-bad.s: New test for PC-relative VSTR. * gas/testsuite/gas/arm/vstr-thumb-bad.l: Likewise. * gas/testsuite/gas/arm/vstr-thumb-bad.d: Likewise. * gas/testsuite/gas/arm/vstr-arm-bad.l: Likewise. * gas/testsuite/gas/arm/vstr-arm-bad.d: Likewise.
Diffstat (limited to 'opcodes/arm-dis.c')
-rw-r--r--opcodes/arm-dis.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c
index 3dfbf5c..b8d02e5 100644
--- a/opcodes/arm-dis.c
+++ b/opcodes/arm-dis.c
@@ -1910,8 +1910,12 @@ print_insn_coprocessor (bfd_vma pc,
if (rn == 15 && (PRE_BIT_SET || WRITEBACK_BIT_SET))
{
func (stream, "\t; ");
- info->print_address_func (offset + pc
- + info->bytes_per_chunk * 2, info);
+ /* For unaligned PCs, apply off-by-alignment
+ correction. */
+ info->print_address_func (offset + pc
+ + info->bytes_per_chunk * 2
+ - (pc & 3),
+ info);
}
}
break;