aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorWill Newton <willnewton@sourceware.org>2013-08-23 07:16:56 +0000
committerWill Newton <willnewton@sourceware.org>2013-08-23 07:16:56 +0000
commit4f2374c7fa5f1f91a59f11670d1c8c269624a15d (patch)
treea7788bcce7094bd1f5f87f43e2024809bc638887 /gas/config
parent1ed3ee940d6f75b32502801cd6a50322488ff277 (diff)
downloadgdb-4f2374c7fa5f1f91a59f11670d1c8c269624a15d.zip
gdb-4f2374c7fa5f1f91a59f11670d1c8c269624a15d.tar.gz
gdb-4f2374c7fa5f1f91a59f11670d1c8c269624a15d.tar.bz2
gas/config/tc-arm.c: Improve validation of NEON addressing modes.
NEON vector load and store instructions do not accept immediates or pre-indexed base plus offset addressing modes, so make sure that the assembler enforces this. gas/ChangeLog: 2013-08-23 Will Newton <will.newton@linaro.org> * config/tc-arm.c (do_neon_ldx_stx): Add extra constraints for pre-indexed addressing modes. * testsuite/gas/arm/neon-addressing-bad.l: Add test for VLDn and VSTn instructions. * testsuite/gas/arm/neon-addressing-bad.s: Likewise. gas/testsuite/ChangeLog: 2013-08-23 Will Newton <will.newton@linaro.org> * testsuite/gas/arm/neon-addressing-bad.l: Add test for VLDn and VSTn instructions. * testsuite/gas/arm/neon-addressing-bad.s: Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-arm.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 21369d7..50e0da7 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -16008,12 +16008,20 @@ do_neon_ldx_stx (void)
_("bad register for post-index"));
inst.instruction |= postreg;
}
- else if (inst.operands[1].writeback)
+ else
{
- inst.instruction |= 0xd;
+ constraint (inst.operands[1].immisreg, BAD_ADDR_MODE);
+ constraint (inst.reloc.exp.X_op != O_constant
+ || inst.reloc.exp.X_add_number != 0,
+ BAD_ADDR_MODE);
+
+ if (inst.operands[1].writeback)
+ {
+ inst.instruction |= 0xd;
+ }
+ else
+ inst.instruction |= 0xf;
}
- else
- inst.instruction |= 0xf;
if (thumb_mode)
inst.instruction |= 0xf9000000;