aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arm.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 /gas/config/tc-arm.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 'gas/config/tc-arm.c')
-rw-r--r--gas/config/tc-arm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index e4bd9f1..fc3d63d 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -14885,6 +14885,18 @@ do_neon_ldr_str (void)
{
int is_ldr = (inst.instruction & (1 << 20)) != 0;
+ /* Use of PC in vstr in ARM mode is deprecated in ARMv7.
+ And is UNPREDICTABLE in thumb mode. */
+ if (!is_ldr
+ && inst.operands[1].reg == REG_PC
+ && ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v7))
+ {
+ if (!thumb_mode && warn_on_deprecated)
+ as_warn (_("Use of PC here is deprecated"));
+ else
+ inst.error = _("Use of PC here is UNPREDICTABLE");
+ }
+
if (inst.operands[0].issingle)
{
if (is_ldr)