summaryrefslogtreecommitdiff
path: root/gas/testsuite/gas/mips/isa-override-2.s
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@imgtec.com>2016-04-22 01:04:52 +0100
committerMaciej W. Rozycki <macro@imgtec.com>2016-06-29 04:08:27 +0100
commit8f2db47d13b6afdba8e7b09a01ac2a0ca41d708e (patch)
treef3701d2d543ccb93d62275b286a0f6e516f9e927 /gas/testsuite/gas/mips/isa-override-2.s
parentb9dfae3c245cc41f95bc4158e6f656ada65397ca (diff)
downloadbinutils-gdb-8f2db47d13b6afdba8e7b09a01ac2a0ca41d708e.tar.gz
MIPS/GAS: Fix an ISA override not lifting ABI restrictionsbinutils-2_25-branch
Correct a regression introduced with commit 919731affbef ("Add MIPS .module directive") causing code like: .set mips3 dli $2, 0x9000000080000000 to fail assembly with the following error message produced: Error: number (0x9000000080000000) larger than 32 bits if built with `mips3' selected as the global ISA (e.g. `-march=mips3'). This is because a `.set' directive doing an ISA override does not lift the ABI restriction on register sizes if the ISA remains unchanged. Previously the directive always set register sizes from the ISA chosen, which is what some code expects. Restore the old semantics then. gas/ * config/tc-mips.c (code_option_type): New enum. (parse_code_option): Return status indicating option type. (s_mipsset): Update `parse_code_option' call site accordingly. Always set register sizes from the ISA with ISA overrides. (s_module): Update `parse_code_option' call site. * testsuite/gas/mips/isa-override-1.d: New test. * testsuite/gas/mips/micromips@isa-override-1.d: New test. * testsuite/gas/mips/mips1@isa-override-1.d: New test. * testsuite/gas/mips/mips2@isa-override-1.d: New test. * testsuite/gas/mips/mips32@isa-override-1.d: New test. * testsuite/gas/mips/mips32r2@isa-override-1.d: New test. * testsuite/gas/mips/mips32r3@isa-override-1.d: New test. * testsuite/gas/mips/mips32r5@isa-override-1.d: New test. * testsuite/gas/mips/mips32r6@isa-override-1.d: New test. * testsuite/gas/mips/mips64r2@isa-override-1.d: New test. * testsuite/gas/mips/mips64r3@isa-override-1.d: New test. * testsuite/gas/mips/mips64r5@isa-override-1.d: New test. * testsuite/gas/mips/mips64r6@isa-override-1.d: New test. * testsuite/gas/mips/r3000@isa-override-1.d: New test. * testsuite/gas/mips/r3900@isa-override-1.d: New test. * testsuite/gas/mips/r5900@isa-override-1.d: New test. * testsuite/gas/mips/octeon@isa-override-1.d: New test. * testsuite/gas/mips/octeon3@isa-override-1.d: New test. * testsuite/gas/mips/isa-override-2.l: New list test. * testsuite/gas/mips/mips1@isa-override-2.l: New list test. * testsuite/gas/mips/mips2@isa-override-2.l: New list test. * testsuite/gas/mips/mips32@isa-override-2.l: New list test. * testsuite/gas/mips/mips32r2@isa-override-2.l: New list test. * testsuite/gas/mips/mips32r3@isa-override-2.l: New list test. * testsuite/gas/mips/mips32r5@isa-override-2.l: New list test. * testsuite/gas/mips/mips32r6@isa-override-2.l: New list test. * testsuite/gas/mips/r3000@isa-override-2.l: New list test. * testsuite/gas/mips/r3900@isa-override-2.l: New list test. * testsuite/gas/mips/octeon3@isa-override-2.l: New list test. * testsuite/gas/mips/octeon3@isa-override-1.l: New stderr output. * testsuite/gas/mips/isa-override-1.s: New test source. * testsuite/gas/mips/r5900@isa-override-1.s: New test source. * testsuite/gas/mips/isa-override-2.s: New test source. * testsuite/gas/mips/mips1@isa-override-2.s: New test source. * testsuite/gas/mips/mips2@isa-override-2.s: New test source. * testsuite/gas/mips/mips32@isa-override-2.s: New test source. * testsuite/gas/mips/mips32r2@isa-override-2.s: New test source. * testsuite/gas/mips/mips32r3@isa-override-2.s: New test source. * testsuite/gas/mips/mips32r5@isa-override-2.s: New test source. * testsuite/gas/mips/mips32r6@isa-override-2.s: New test source. * testsuite/gas/mips/r3000@isa-override-2.s: New test source. * testsuite/gas/mips/r3900@isa-override-2.s: New test source. * testsuite/gas/mips/octeon3@isa-override-2.s: New test source. * testsuite/gas/mips/mips.exp: Run the new tests. (cherry picked from commit 5475e3249a6ab15afa0fe00456ada988d940a302)
Diffstat (limited to 'gas/testsuite/gas/mips/isa-override-2.s')
-rw-r--r--gas/testsuite/gas/mips/isa-override-2.s18
1 files changed, 18 insertions, 0 deletions
diff --git a/gas/testsuite/gas/mips/isa-override-2.s b/gas/testsuite/gas/mips/isa-override-2.s
new file mode 100644
index 00000000000..402c1182955
--- /dev/null
+++ b/gas/testsuite/gas/mips/isa-override-2.s
@@ -0,0 +1,18 @@
+ .text
+ .globl foo
+ .ent foo
+foo:
+ dli $2, 0x9000000080000000
+ .set push
+ .set mips3
+ dli $2, 0x9000000080000000
+ .set mips0
+ dli $2, 0x9000000080000000
+ .set mips3
+ .set pop
+ dli $2, 0x9000000080000000
+ .end foo
+
+# Force some (non-delay-slot) zero bytes, to make 'objdump' print ...
+ .align 4, 0
+ .space 16