aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2010-12-09 23:57:22 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2010-12-09 23:57:22 +0000
commit738f4d98b409bad654486d6c1db037f2e320535a (patch)
treeff3e6a5489959af6d652091db25b941f58477ef5 /gas
parentc7af42732698afc889b4d53944a44c7ea4a7613f (diff)
downloadgdb-738f4d98b409bad654486d6c1db037f2e320535a.zip
gdb-738f4d98b409bad654486d6c1db037f2e320535a.tar.gz
gdb-738f4d98b409bad654486d6c1db037f2e320535a.tar.bz2
gas/
* config/tc-mips.c (file_ase_mips16): Adjust comment. (append_insn): Update file_ase_mips16. (mips_after_parse_args): Don't set file_ase_mips16 here. gas/testsuite/ * gas/mips/elf_ase_mips16.d: Update test for new MIPS16 ASE flag semantics. * gas/mips/elf_ase_mips16-2.d: New test. * gas/mips/nop.s: Source for the new test. * gas/mips/mips.exp: Run the new test. binutils/testsuite/ * lib/binutils-common.exp (regexp_diff): Implement inverse matching, requested by `!'.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-mips.c6
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/mips/elf_ase_mips16-2.d8
-rw-r--r--gas/testsuite/gas/mips/elf_ase_mips16.d2
-rw-r--r--gas/testsuite/gas/mips/mips.exp5
-rw-r--r--gas/testsuite/gas/mips/nop.s1
7 files changed, 31 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ce56b30..fae5743 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,11 @@
2010-12-09 Maciej W. Rozycki <macro@codesourcery.com>
+ * config/tc-mips.c (file_ase_mips16): Adjust comment.
+ (append_insn): Update file_ase_mips16.
+ (mips_after_parse_args): Don't set file_ase_mips16 here.
+
+2010-12-09 Maciej W. Rozycki <macro@codesourcery.com>
+
* config/tc-mips.c (macro)
<M_MSGSND, M_MSGLD, M_MSGLD_T, M_MSGWAIT, M_MSGWAIT_T>: Remove
dedicated return points.
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 0473b10..64a0717 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -282,8 +282,7 @@ unsigned long mips_cprmask[4];
/* MIPS ISA we are using for this output file. */
static int file_mips_isa = ISA_UNKNOWN;
-/* True if -mips16 was passed or implied by arguments passed on the
- command line (e.g., by -march). */
+/* True if any MIPS16 code was produced. */
static int file_ase_mips16;
#define ISA_SUPPORTS_MIPS16E (mips_opts.isa == ISA_MIPS32 \
@@ -2811,6 +2810,8 @@ append_insn (struct mips_cl_insn *ip, expressionS *address_expr,
/* Mark instruction labels in mips16 mode. */
mips16_mark_labels ();
+ file_ase_mips16 |= mips_opts.mips16;
+
prev_pinfo = history[0].insn_mo->pinfo;
pinfo = ip->insn_mo->pinfo;
@@ -12045,7 +12046,6 @@ mips_after_parse_args (void)
mips_cpu_info_from_isa (mips_opts.isa)->name);
file_mips_isa = mips_opts.isa;
- file_ase_mips16 = mips_opts.mips16;
file_ase_mips3d = mips_opts.ase_mips3d;
file_ase_mdmx = mips_opts.ase_mdmx;
file_ase_smartmips = mips_opts.ase_smartmips;
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 8fff99d..3675cbc2 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,13 @@
2010-12-09 Maciej W. Rozycki <macro@codesourcery.com>
+ * gas/mips/elf_ase_mips16.d: Update test for new MIPS16 ASE flag
+ semantics.
+ * gas/mips/elf_ase_mips16-2.d: New test.
+ * gas/mips/nop.s: Source for the new test.
+ * gas/mips/mips.exp: Run the new test.
+
+2010-12-09 Maciej W. Rozycki <macro@codesourcery.com>
+
* gas/mips/jal-svr4pic.d: Also use wildcard address matching in
relocations.
* gas/mips/mips1@jal-svr4pic.d: Likewise.
diff --git a/gas/testsuite/gas/mips/elf_ase_mips16-2.d b/gas/testsuite/gas/mips/elf_ase_mips16-2.d
new file mode 100644
index 0000000..89b28b0
--- /dev/null
+++ b/gas/testsuite/gas/mips/elf_ase_mips16-2.d
@@ -0,0 +1,8 @@
+# name: ELF MIPS16 ASE markings 2
+# source: nop.s
+# objdump: -p
+# as: -32 -mips16
+
+.*:.*file format.*mips.*
+private flags = [0-9a-f]*[4-7c-f]......: .*[[,]mips16[],].*
+
diff --git a/gas/testsuite/gas/mips/elf_ase_mips16.d b/gas/testsuite/gas/mips/elf_ase_mips16.d
index 74bb987..89fbc5b 100644
--- a/gas/testsuite/gas/mips/elf_ase_mips16.d
+++ b/gas/testsuite/gas/mips/elf_ase_mips16.d
@@ -4,5 +4,5 @@
# as: -32 -mips16
.*:.*file format.*mips.*
-private flags = [0-9a-f]*[4-7c-f]......: .*[[,]mips16[],].*
+!private flags = .*mips16.*
diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp
index 6e98082..7075f9d 100644
--- a/gas/testsuite/gas/mips/mips.exp
+++ b/gas/testsuite/gas/mips/mips.exp
@@ -743,7 +743,10 @@ if { [istarget mips*-*-vxworks*] } {
run_dump_test "elf_arch_mips64r2"
# Verify that ASE markings are handled properly.
- if { !$no_mips16 } { run_dump_test "elf_ase_mips16" }
+ if { !$no_mips16 } {
+ run_dump_test "elf_ase_mips16"
+ run_dump_test "elf_ase_mips16-2"
+ }
run_dump_test "mips-gp32-fp32-pic"
run_dump_test "mips-gp32-fp64-pic"
diff --git a/gas/testsuite/gas/mips/nop.s b/gas/testsuite/gas/mips/nop.s
new file mode 100644
index 0000000..4e7fe2f
--- /dev/null
+++ b/gas/testsuite/gas/mips/nop.s
@@ -0,0 +1 @@
+ nop