aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2010-07-01 10:02:46 +0000
committerMatthew Gretton-Dann <matthew.gretton-dann@arm.com>2010-07-01 10:02:46 +0000
commit76fa04a48e54c68fa6f16db02634b86ff340b98e (patch)
treec8e86d7a21cbaed719d8a17700ddab1de275ac3f /gas/config
parent726d3ab069e07a312b87d892e596464e463c2744 (diff)
downloadgdb-76fa04a48e54c68fa6f16db02634b86ff340b98e.zip
gdb-76fa04a48e54c68fa6f16db02634b86ff340b98e.tar.gz
gdb-76fa04a48e54c68fa6f16db02634b86ff340b98e.tar.bz2
* gas/config/tc-arm.c (do_t_mov_cmp): Fix reporting of unpredictable and
deprecated mov register instructions. * gas/testsuite/gas/arm/thumb2_bad_reg.s: Update mov register tests. * gas/testsuite/gas/arm/thumb2_bad_reg.l: Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-arm.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 8137868..67b36d5 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -10273,9 +10273,24 @@ do_t_mov_cmp (void)
reject_bad_reg (Rn);
reject_bad_reg (Rm);
}
- else if ((Rn == REG_SP || Rn == REG_PC)
- && (Rm == REG_SP || Rm == REG_PC))
- reject_bad_reg (Rm);
+ else if (narrow)
+ {
+ /* This is mov.n. */
+ if ((Rn == REG_SP || Rn == REG_PC)
+ && (Rm == REG_SP || Rm == REG_PC))
+ {
+ as_warn (_("Use of r%u as a source register is "
+ "deprecated when r%u is the destination "
+ "register."), Rm, Rn);
+ }
+ }
+ else
+ {
+ /* This is mov.w. */
+ constraint (Rn == REG_PC, BAD_PC);
+ constraint (Rm == REG_PC, BAD_PC);
+ constraint (Rn == REG_SP && Rm == REG_SP, BAD_SP);
+ }
}
else
reject_bad_reg (Rn);