diff options
author | Nick Clifton <nickc@redhat.com> | 2004-04-30 10:51:13 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2004-04-30 10:51:13 +0000 |
commit | 376eb240f8acae77064d500acf968a38a3982091 (patch) | |
tree | 79125436e5a016f24a40021d29eabc71c3bcd899 | |
parent | 20f0a1ada4858aa084cb914cd7381482c086cdf5 (diff) | |
download | gdb-376eb240f8acae77064d500acf968a38a3982091.zip gdb-376eb240f8acae77064d500acf968a38a3982091.tar.gz gdb-376eb240f8acae77064d500acf968a38a3982091.tar.bz2 |
Fix handling of case sensitive register aliases and add a test for the bug
-rw-r--r-- | gas/ChangeLog | 9 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 8 | ||||
-rw-r--r-- | gas/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/arm.exp | 50 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/reg-alias.d | 10 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/reg-alias.s | 14 |
6 files changed, 59 insertions, 40 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 8743b24..53570b9 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,12 @@ +2004-04-30 Nick Clifton <nickc@redhat.com> + + * config/tc-arm.c (create_register_alias): Fix typo checking for + case sensitive register aliases. + (co_proc_number): Use error message string in all_reg_maps[] + array. + (cp_reg_required_here): Likewise. + (fp_reg_required_here): Likewise. + 2004-04-29 Brian Ford <ford@vss.fsi.com> * dwarf2dbg.c (dwarf2_finish): Add SEC_DEBUGGING to section flags. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 0269df3..3f21c84 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -3595,7 +3595,7 @@ co_proc_number (str) } else { - inst.error = _("bad or missing co-processor number"); + inst.error = all_reg_maps[REG_TYPE_CP].expected; return FAIL; } } @@ -3650,7 +3650,7 @@ cp_reg_required_here (str, where) /* In the few cases where we might be able to accept something else this error can be overridden. */ - inst.error = _("co-processor register expected"); + inst.error = all_reg_maps[REG_TYPE_CN].expected; /* Restore the start point. */ *str = start; @@ -3673,7 +3673,7 @@ fp_reg_required_here (str, where) /* In the few cases where we might be able to accept something else this error can be overridden. */ - inst.error = _("floating point register expected"); + inst.error = all_reg_maps[REG_TYPE_FN].expected; /* Restore the start point. */ *str = start; @@ -11439,7 +11439,7 @@ create_register_alias (newname, p) char *copy_of_str; char *r; -#ifdef IGNORE_OPCODE_CASE +#ifndef IGNORE_OPCODE_CASE newname = original_case_string; #endif copy_of_str = newname; diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 1cfce64..70b65bc 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2004-04-30 Nick Clifton <nickc@redhat.com> + + * gas/arm/reg-alias.s: New file: Test case sensitive register + aliases. + * gas/arm/reg-alias.d: New file: Expected test output. + * gas/arm/arm.exp: Run reg-alias test. + Arrange tests in a more orderly fashion. + 2004-04-30 Ben Elliston <bje@au.ibm.com> * gas/ppc/power4.s: Add dcbz and dcbzl test cases. diff --git a/gas/testsuite/gas/arm/arm.exp b/gas/testsuite/gas/arm/arm.exp index e5ec8be..36045e6 100644 --- a/gas/testsuite/gas/arm/arm.exp +++ b/gas/testsuite/gas/arm/arm.exp @@ -28,66 +28,44 @@ if {[istarget *arm*-*-*] || [istarget "xscale-*-*"]} then { run_dump_test "copro" } - run_dump_test "armv1" - - run_errors_test "armv1-bad" "-mcpu=arm7m" "ARM v1 errors" - gas_test "arm3.s" "-mcpu=arm3" $stdoptlist "Arm 3 instructions" - gas_test "arm6.s" "-mcpu=arm6" $stdoptlist "Arm 6 instructions" - gas_test "arm7dm.s" "-mcpu=arm7dm" $stdoptlist "Arm 7DM instructions" - - if {! [istarget arm*-*-aout] && ![istarget arm-*-pe]} then { - # The arm-aout port does not support Thumb mode. - gas_test "thumb.s" "-mcpu=arm7t" $stdoptlist "Thumb instructions" - } - gas_test "arch4t.s" "-march=armv4t" $stdoptlist "Arm architecture 4t instructions" - - run_dump_test "arch5tej" - gas_test "immed.s" "" $stdoptlist "immediate expressions" - gas_test "float.s" "-mcpu=arm7tdmi -mfpu=fpa" $stdoptlist "Core floating point instructions" + gas_test "offset.s" "" $stdoptlist "OFFSET_IMM regression" + run_dump_test "armv1" + run_dump_test "arch5tej" run_dump_test "fpa-monadic" - run_dump_test "fpa-dyadic" - run_dump_test "fpa-mem" - run_dump_test "vfp1xD" - run_dump_test "vfp1" - run_dump_test "vfp2" - - run_errors_test "vfp-bad" "-mfpu=vfp" "VFP errors" - run_dump_test "xscale" - run_dump_test "adrl" - - run_errors_test "req" "-mcpu=arm7m" ".req errors" - - run_dump_test "maverick" - + run_dump_test "reg-alias" + run_dump_test "maverick" run_dump_test "archv6" - run_dump_test "thumbv6" - + + run_errors_test "vfp-bad" "-mfpu=vfp" "VFP errors" + run_errors_test "req" "-mcpu=arm7m" ".req errors" + run_errors_test "armv1-bad" "-mcpu=arm7m" "ARM v1 errors" run_errors_test "r15-bad" "" "Invalid use of r15 errors" + run_errors_test "undefined" "" "Undefined local label error" if {[istarget *-*-elf*] || [istarget *-*-linux*]} then { run_dump_test "pic" - run_dump_test "mapping" } - gas_test "offset.s" "" $stdoptlist "OFFSET_IMM regression" - - run_errors_test "undefined" "" "Undefined local label error" + if {! [istarget arm*-*-aout] && ![istarget arm-*-pe]} then { + # The arm-aout port does not support Thumb mode. + gas_test "thumb.s" "-mcpu=arm7t" $stdoptlist "Thumb instructions" + } } # Not all arm targets are bi-endian, so only run this test on ones diff --git a/gas/testsuite/gas/arm/reg-alias.d b/gas/testsuite/gas/arm/reg-alias.d new file mode 100644 index 0000000..d9b4be2 --- /dev/null +++ b/gas/testsuite/gas/arm/reg-alias.d @@ -0,0 +1,10 @@ +#objdump: -dr --prefix-addresses --show-raw-insn +#name: Case Sensitive Register Aliases + +.*: +file format .*arm.* + +Disassembly of section .text: +0+0 <.*> ee060f10 mcr 15, 0, r0, cr6, cr0, \{0\} +0+4 <.*> e1a00000 nop \(mov r0,r0\) +0+8 <.*> e1a00000 nop \(mov r0,r0\) +0+c <.*> e1a00000 nop \(mov r0,r0\) diff --git a/gas/testsuite/gas/arm/reg-alias.s b/gas/testsuite/gas/arm/reg-alias.s new file mode 100644 index 0000000..5086b8b --- /dev/null +++ b/gas/testsuite/gas/arm/reg-alias.s @@ -0,0 +1,14 @@ + @ Test case-sensitive register aliases + .text + .global fred +fred: + +MMUPurgeTLBReg .req c6 +MMUCP .req p15 + +MCR MMUCP, 0, a1, MMUPurgeTLBReg, c0, 0 + @ The NOPs are here for ports like arm-aout which will pad + @ the .text section to a 16 byte boundary. + nop + nop + nop |