diff options
author | Paul Brook <paul@codesourcery.com> | 2005-09-06 15:57:06 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2005-09-06 15:57:06 +0000 |
commit | 9a64e435419869030e27d54f0433810b8b56d1ac (patch) | |
tree | 3681699f16aac6d1c4e1f0edc2e05dded5728fbc /gas/config | |
parent | c0eabf1a036d29726d02f83b54f6b0c7aae4c56d (diff) | |
download | gdb-9a64e435419869030e27d54f0433810b8b56d1ac.zip gdb-9a64e435419869030e27d54f0433810b8b56d1ac.tar.gz gdb-9a64e435419869030e27d54f0433810b8b56d1ac.tar.bz2 |
2005-09-02 Paul Brook <paul@codesourcery.com>
gas/
* config/tc-arm.c (do_rn_rd): Enforce SWP operand constraints.
gas/testsuite/
* gas/arm/arm3-bad.s: New test.
* gas/arm/arm3-bad.d: New test.
* gas/arm/arm3.s: Avoid illegal instructions.
* gas/arm/arm3.d: Ditto.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-arm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 16f1db7..23d5bc7 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -4339,9 +4339,14 @@ do_rn_rd (void) static void do_rd_rm_rn (void) { + unsigned Rn = inst.operands[2].reg; + /* Enforce resutrictions on SWP instruction. */ + if ((inst.instruction & 0x0fbfffff) == 0x01000090) + constraint (Rn == inst.operands[0].reg || Rn == inst.operands[1].reg, + _("Rn must not overlap other operands")); inst.instruction |= inst.operands[0].reg << 12; inst.instruction |= inst.operands[1].reg; - inst.instruction |= inst.operands[2].reg << 16; + inst.instruction |= Rn << 16; } static void |