From: Kazu Hirata Date: Thu, 4 May 2006 15:41:00 +0000 (+0000) Subject: gas/ X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=088fa78ea05bf3a6da2a92a9c45b1b76cc59a127;p=binutils-gdb.git gas/ * config/tc-arm.c (opcode_tag): Add OT_cinfix3_deprecated. (opcode_lookup): Issue a warning for opcode with OT_cinfix3_deprecated. Otherwise treat OT_cinfix3_deprecated identical to OT_cinfix3. (TxC3w, TC3w, tC3w): New. (insns): Use tC3w and TC3w for comparison instructions with 's' suffix. gas/testsuite * gas/arm/armv1.d (error-output): New. * gas/arm/armv1.l: New. * gas/arm/thumb32.d (error-output): New. * gas/arm/thumb32.l: New. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 0d51e96430b..409173810ea 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,13 @@ +2006-05-04 Kazu Hirata + + * config/tc-arm.c (opcode_tag): Add OT_cinfix3_deprecated. + (opcode_lookup): Issue a warning for opcode with + OT_cinfix3_deprecated. Otherwise treat OT_cinfix3_deprecated + identical to OT_cinfix3. + (TxC3w, TC3w, tC3w): New. + (insns): Use tC3w and TC3w for comparison instructions with + 's' suffix. + 2006-05-04 Alan Modra * subsegs.h (struct frchain): Delete frch_seg. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 2e30f3910d2..243fc1a3739 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -12111,6 +12111,8 @@ enum opcode_tag OT_cinfix3, /* Instruction takes a conditional infix, beginning at character index 3. (In unified mode, it becomes a suffix.) */ + OT_cinfix3_deprecated, /* The same as OT_cinfix3. This is used for + tsts, cmps, cmns, and teqs. */ OT_cinfix3_legacy, /* Legacy instruction takes a conditional infix at character index 3, even in unified mode. Used for legacy instructions where suffix and infix forms @@ -12267,6 +12269,7 @@ opcode_lookup (char **str) break; case OT_cinfix3: + case OT_cinfix3_deprecated: case OT_odd_infix_unc: if (!unified_syntax) return 0; @@ -12313,11 +12316,16 @@ opcode_lookup (char **str) memmove (affix + 2, affix, (end - affix) - 2); memcpy (affix, save, 2); - if (opcode && (opcode->tag == OT_cinfix3 || opcode->tag == OT_csuf_or_in3 - || opcode->tag == OT_cinfix3_legacy)) + if (opcode + && (opcode->tag == OT_cinfix3 + || opcode->tag == OT_cinfix3_deprecated + || opcode->tag == OT_csuf_or_in3 + || opcode->tag == OT_cinfix3_legacy)) { /* step CM */ - if (unified_syntax && opcode->tag == OT_cinfix3) + if (unified_syntax + && (opcode->tag == OT_cinfix3 + || opcode->tag == OT_cinfix3_deprecated)) as_warn (_("conditional infixes are deprecated in unified syntax")); inst.cond = cond->value; @@ -12356,6 +12364,9 @@ md_assemble (char *str) return; } + if (opcode->tag == OT_cinfix3_deprecated) + as_warn (_("s suffix on comparison instruction is deprecated")); + if (thumb_mode) { arm_feature_set variant; @@ -12857,10 +12868,17 @@ static struct asm_barrier_opt barrier_opt_names[] = #define TxC3(mnem, op, top, nops, ops, ae, te) \ { #mnem, OPS##nops ops, OT_cinfix3, 0x##op, top, ARM_VARIANT, \ THUMB_VARIANT, do_##ae, do_##te } +#define TxC3w(mnem, op, top, nops, ops, ae, te) \ + { #mnem, OPS##nops ops, OT_cinfix3_deprecated, 0x##op, top, ARM_VARIANT, \ + THUMB_VARIANT, do_##ae, do_##te } #define TC3(mnem, aop, top, nops, ops, ae, te) \ TxC3(mnem, aop, 0x##top, nops, ops, ae, te) +#define TC3w(mnem, aop, top, nops, ops, ae, te) \ + TxC3w(mnem, aop, 0x##top, nops, ops, ae, te) #define tC3(mnem, aop, top, nops, ops, ae, te) \ TxC3(mnem, aop, T_MNEM_##top, nops, ops, ae, te) +#define tC3w(mnem, aop, top, nops, ops, ae, te) \ + TxC3w(mnem, aop, T_MNEM_##top, nops, ops, ae, te) /* Mnemonic with a conditional infix in an unusual place. Each and every variant has to appear in the condition table. */ @@ -13023,13 +13041,13 @@ static const struct asm_opcode insns[] = for setting PSR flag bits. They are obsolete in V6 and do not have Thumb equivalents. */ tCE(tst, 1100000, tst, 2, (RR, SH), cmp, t_mvn_tst), - tC3(tsts, 1100000, tst, 2, (RR, SH), cmp, t_mvn_tst), + tC3w(tsts, 1100000, tst, 2, (RR, SH), cmp, t_mvn_tst), CL(tstp, 110f000, 2, (RR, SH), cmp), tCE(cmp, 1500000, cmp, 2, (RR, SH), cmp, t_mov_cmp), - tC3(cmps, 1500000, cmp, 2, (RR, SH), cmp, t_mov_cmp), + tC3w(cmps, 1500000, cmp, 2, (RR, SH), cmp, t_mov_cmp), CL(cmpp, 150f000, 2, (RR, SH), cmp), tCE(cmn, 1700000, cmn, 2, (RR, SH), cmp, t_mvn_tst), - tC3(cmns, 1700000, cmn, 2, (RR, SH), cmp, t_mvn_tst), + tC3w(cmns, 1700000, cmn, 2, (RR, SH), cmp, t_mvn_tst), CL(cmnp, 170f000, 2, (RR, SH), cmp), tCE(mov, 1a00000, mov, 2, (RR, SH), mov, t_mov_cmp), @@ -13083,7 +13101,7 @@ static const struct asm_opcode insns[] = TCE(rsb, 0600000, ebc00000, 3, (RR, oRR, SH), arit, t_rsb), TC3(rsbs, 0700000, ebd00000, 3, (RR, oRR, SH), arit, t_rsb), TCE(teq, 1300000, ea900f00, 2, (RR, SH), cmp, t_mvn_tst), - TC3(teqs, 1300000, ea900f00, 2, (RR, SH), cmp, t_mvn_tst), + TC3w(teqs, 1300000, ea900f00, 2, (RR, SH), cmp, t_mvn_tst), CL(teqp, 130f000, 2, (RR, SH), cmp), TC3(ldrt, 4300000, f8500e00, 2, (RR, ADDR), ldstt, t_ldstt), diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 4a377b43683..dbed5162e8f 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2006-05-04 Kazu Hirata + + * gas/arm/armv1.d (error-output): New. + * gas/arm/armv1.l: New. + * gas/arm/thumb32.d (error-output): New. + * gas/arm/thumb32.l: New. + 2006-05-04 Thiemo Seufer Nigel Stephens diff --git a/gas/testsuite/gas/arm/armv1.d b/gas/testsuite/gas/arm/armv1.d index 4e4c9137617..75f13204ff0 100644 --- a/gas/testsuite/gas/arm/armv1.d +++ b/gas/testsuite/gas/arm/armv1.d @@ -1,6 +1,7 @@ #objdump: -dr --prefix-addresses --show-raw-insn #name: ARM v1 instructions #as: -mcpu=arm7t +#error-output: armv1.l # Test the ARM v1 instructions diff --git a/gas/testsuite/gas/arm/armv1.l b/gas/testsuite/gas/arm/armv1.l new file mode 100644 index 00000000000..369f9d4a510 --- /dev/null +++ b/gas/testsuite/gas/arm/armv1.l @@ -0,0 +1,5 @@ +[^:]*: Assembler messages: +[^:]*:26: Warning: s suffix on comparison instruction is deprecated +[^:]*:29: Warning: s suffix on comparison instruction is deprecated +[^:]*:32: Warning: s suffix on comparison instruction is deprecated +[^:]*:35: Warning: s suffix on comparison instruction is deprecated diff --git a/gas/testsuite/gas/arm/thumb32.d b/gas/testsuite/gas/arm/thumb32.d index 2977779aefd..2a6e6828d7e 100644 --- a/gas/testsuite/gas/arm/thumb32.d +++ b/gas/testsuite/gas/arm/thumb32.d @@ -3,6 +3,7 @@ # objdump: -dr --prefix-addresses --show-raw-insn # The arm-aout and arm-pe ports do not support Thumb branch relocations. # not-target: *-*-*aout* *-*-pe +# error-output: thumb32.l .*: +file format .*arm.* diff --git a/gas/testsuite/gas/arm/thumb32.l b/gas/testsuite/gas/arm/thumb32.l new file mode 100644 index 00000000000..c687beac79e --- /dev/null +++ b/gas/testsuite/gas/arm/thumb32.l @@ -0,0 +1,17 @@ +[^;]*: Assembler messages: +[^;]*:446: Warning: s suffix on comparison instruction is deprecated +[^;]*:446: Warning: s suffix on comparison instruction is deprecated +[^;]*:446: Warning: s suffix on comparison instruction is deprecated +[^;]*:446: Warning: s suffix on comparison instruction is deprecated +[^;]*:447: Warning: s suffix on comparison instruction is deprecated +[^;]*:447: Warning: s suffix on comparison instruction is deprecated +[^;]*:447: Warning: s suffix on comparison instruction is deprecated +[^;]*:447: Warning: s suffix on comparison instruction is deprecated +[^;]*:448: Warning: s suffix on comparison instruction is deprecated +[^;]*:448: Warning: s suffix on comparison instruction is deprecated +[^;]*:448: Warning: s suffix on comparison instruction is deprecated +[^;]*:448: Warning: s suffix on comparison instruction is deprecated +[^;]*:449: Warning: s suffix on comparison instruction is deprecated +[^;]*:449: Warning: s suffix on comparison instruction is deprecated +[^;]*:449: Warning: s suffix on comparison instruction is deprecated +[^;]*:449: Warning: s suffix on comparison instruction is deprecated