diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2013-07-12 15:58:13 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2013-07-12 15:58:13 +0000 |
commit | 4d6fffec440ca1389fa6d3246d253e384a1df981 (patch) | |
tree | e794ad901acf930ddb9725c44f551c593799cda9 /gas/testsuite | |
parent | b9d43280fefaa1192774dabca8abca95fb95ee4c (diff) | |
download | binutils-redhat-4d6fffec440ca1389fa6d3246d253e384a1df981.tar.gz |
include/elf/
* mips.h (EF_MIPS_NAN2008): New macro.
bfd/
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Handle
EF_MIPS_NAN2008.
(_bfd_mips_elf_print_private_bfd_data): Likewise.
binutils/
* readelf.c (get_machine_flags): Handle EF_MIPS_NAN2008.
gas/
* config/tc-mips.c (mips_flag_nan2008): New variable.
(options): Add OPTION_NAN enum value.
(md_longopts): Handle it.
(md_parse_option): Likewise.
(s_nan): New function.
(mips_elf_final_processing): Handle EF_MIPS_NAN2008.
(md_show_usage): Add -mnan.
* doc/as.texinfo (Overview): Add -mnan.
* doc/c-mips.texi (MIPS Opts): Document -mnan.
(MIPS NaN Encodings): New node. Document .nan directive.
(MIPS-Dependent): List the new node.
gas/testsuite/
* gas/mips/nan-2008-1.d: New test.
* gas/mips/nan-2008-2.d: New test.
* gas/mips/nan-2008-3.d: New test.
* gas/mips/nan-2008-4.d: New test.
* gas/mips/nan-legacy-1.d: New test.
* gas/mips/nan-legacy-2.d: New test.
* gas/mips/nan-legacy-3.d: New test.
* gas/mips/nan-legacy-4.d: New test.
* gas/mips/nan-legacy-5.d: New test.
* gas/mips/nan-error-1.l: New list test.
* gas/mips/nan-error-2.l: New list test.
* gas/mips/nan-2008-override.s: New test source.
* gas/mips/nan-2008.s: New test source.
* gas/mips/nan-legacy-override.s: New test source.
* gas/mips/nan-legacy.s: New test source.
* gas/mips/nan-error-1.s: New test source.
* gas/mips/nan-error-2.s: New test source.
* gas/mips/mips.exp: Run the new tests.
ld/testsuite/
* ld-mips-elf/nan-2008.d: New test.
* ld-mips-elf/nan-legacy.d: New test.
* ld-mips-elf/nan-mixed-1.d: New test.
* ld-mips-elf/nan-mixed-2.d: New test.
* ld-mips-elf/nan-2008.s: New test source.
* ld-mips-elf/nan-legacy.s: New test source.
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 21 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/mips.exp | 14 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-2008-1.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-2008-2.d | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-2008-3.d | 6 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-2008-4.d | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-2008-override.s | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-2008.s | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-error-1.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-error-1.s | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-error-2.l | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-error-2.s | 1 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-legacy-1.d | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-legacy-2.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-legacy-3.d | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-legacy-4.d | 8 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-legacy-5.d | 7 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-legacy-override.s | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/mips/nan-legacy.s | 1 |
19 files changed, 110 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 8deb0d7569..882bcc60b1 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,24 @@ +2013-07-12 Maciej W. Rozycki <macro@codesourcery.com> + + * gas/mips/nan-2008-1.d: New test. + * gas/mips/nan-2008-2.d: New test. + * gas/mips/nan-2008-3.d: New test. + * gas/mips/nan-2008-4.d: New test. + * gas/mips/nan-legacy-1.d: New test. + * gas/mips/nan-legacy-2.d: New test. + * gas/mips/nan-legacy-3.d: New test. + * gas/mips/nan-legacy-4.d: New test. + * gas/mips/nan-legacy-5.d: New test. + * gas/mips/nan-error-1.l: New list test. + * gas/mips/nan-error-2.l: New list test. + * gas/mips/nan-2008-override.s: New test source. + * gas/mips/nan-2008.s: New test source. + * gas/mips/nan-legacy-override.s: New test source. + * gas/mips/nan-legacy.s: New test source. + * gas/mips/nan-error-1.s: New test source. + * gas/mips/nan-error-2.s: New test source. + * gas/mips/mips.exp: Run the new tests. + 2013-07-09 Richard Sandiford <rdsandiford@googlemail.com> * gas/mips/la-reloc.s, gas/mips/la-reloc.d, gas/mips/dla-reloc.s, diff --git a/gas/testsuite/gas/mips/mips.exp b/gas/testsuite/gas/mips/mips.exp index 673b1d7a18..73127dd2e3 100644 --- a/gas/testsuite/gas/mips/mips.exp +++ b/gas/testsuite/gas/mips/mips.exp @@ -915,6 +915,20 @@ if { [istarget mips*-*-vxworks*] } { run_dump_test_arches "loc-swap-2" [mips_arch_list_all] run_dump_test_arches "loc-swap-3" [mips_arch_list_all] + run_dump_test "nan-legacy-1" + run_dump_test "nan-legacy-2" + run_dump_test "nan-legacy-3" + run_dump_test "nan-legacy-4" + run_dump_test "nan-legacy-5" + + run_dump_test "nan-2008-1" + run_dump_test "nan-2008-2" + run_dump_test "nan-2008-3" + run_dump_test "nan-2008-4" + + run_list_test "nan-error-1" + run_list_test "nan-error-2" "-mnan=foo" + if $has_newabi { run_dump_test "n32-consec" } diff --git a/gas/testsuite/gas/mips/nan-2008-1.d b/gas/testsuite/gas/mips/nan-2008-1.d new file mode 100644 index 0000000000..3649fd23f6 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-2008-1.d @@ -0,0 +1,6 @@ +#name: MIPS 2008 NaN setting 1 +#source: nan-2008.s +#objdump: -p + +.*:.*file format.*mips.* +private flags = [0-9a-f]*[4-7c-f]..: .*[[,]nan2008[],].* diff --git a/gas/testsuite/gas/mips/nan-2008-2.d b/gas/testsuite/gas/mips/nan-2008-2.d new file mode 100644 index 0000000000..e8a07cebbf --- /dev/null +++ b/gas/testsuite/gas/mips/nan-2008-2.d @@ -0,0 +1,7 @@ +#name: MIPS 2008 NaN setting 2 +#source: nan-2008.s +#objdump: -p +#as: -mnan=legacy + +.*:.*file format.*mips.* +private flags = [0-9a-f]*[4-7c-f]..: .*[[,]nan2008[],].* diff --git a/gas/testsuite/gas/mips/nan-2008-3.d b/gas/testsuite/gas/mips/nan-2008-3.d new file mode 100644 index 0000000000..7c3c4a3e05 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-2008-3.d @@ -0,0 +1,6 @@ +#name: MIPS 2008 NaN setting 3 +#source: nan-2008-override.s +#objdump: -p + +.*:.*file format.*mips.* +private flags = [0-9a-f]*[4-7c-f]..: .*[[,]nan2008[],].* diff --git a/gas/testsuite/gas/mips/nan-2008-4.d b/gas/testsuite/gas/mips/nan-2008-4.d new file mode 100644 index 0000000000..22ba87ff49 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-2008-4.d @@ -0,0 +1,7 @@ +#name: MIPS 2008 NaN setting 4 +#source: empty.s +#objdump: -p +#as: -mnan=2008 + +.*:.*file format.*mips.* +private flags = [0-9a-f]*[4-7c-f]..: .*[[,]nan2008[],].* diff --git a/gas/testsuite/gas/mips/nan-2008-override.s b/gas/testsuite/gas/mips/nan-2008-override.s new file mode 100644 index 0000000000..ec6d6b853b --- /dev/null +++ b/gas/testsuite/gas/mips/nan-2008-override.s @@ -0,0 +1,2 @@ + .nan legacy + .nan 2008 diff --git a/gas/testsuite/gas/mips/nan-2008.s b/gas/testsuite/gas/mips/nan-2008.s new file mode 100644 index 0000000000..9a3875eae5 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-2008.s @@ -0,0 +1 @@ + .nan 2008 diff --git a/gas/testsuite/gas/mips/nan-error-1.l b/gas/testsuite/gas/mips/nan-error-1.l new file mode 100644 index 0000000000..470bf9ce4f --- /dev/null +++ b/gas/testsuite/gas/mips/nan-error-1.l @@ -0,0 +1,2 @@ +.*\.s: Assembler messages: +.*\.s:1: Error: Bad .nan directive diff --git a/gas/testsuite/gas/mips/nan-error-1.s b/gas/testsuite/gas/mips/nan-error-1.s new file mode 100644 index 0000000000..c6f64c3ec1 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-error-1.s @@ -0,0 +1 @@ + .nan foo diff --git a/gas/testsuite/gas/mips/nan-error-2.l b/gas/testsuite/gas/mips/nan-error-2.l new file mode 100644 index 0000000000..2182615685 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-error-2.l @@ -0,0 +1,2 @@ +Assembler messages: +Fatal error: Invalid NaN setting -mnan=foo diff --git a/gas/testsuite/gas/mips/nan-error-2.s b/gas/testsuite/gas/mips/nan-error-2.s new file mode 100644 index 0000000000..dc87e66759 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-error-2.s @@ -0,0 +1 @@ +# No contents necessary. diff --git a/gas/testsuite/gas/mips/nan-legacy-1.d b/gas/testsuite/gas/mips/nan-legacy-1.d new file mode 100644 index 0000000000..4dcb93c464 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-legacy-1.d @@ -0,0 +1,7 @@ +#name: MIPS legacy NaN setting 1 +#source: nan-legacy.s +#objdump: -p + +.*:.*file format.*mips.* +#failif +private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].* diff --git a/gas/testsuite/gas/mips/nan-legacy-2.d b/gas/testsuite/gas/mips/nan-legacy-2.d new file mode 100644 index 0000000000..6ad4dce308 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-legacy-2.d @@ -0,0 +1,8 @@ +#name: MIPS legacy NaN setting 2 +#source: nan-legacy.s +#objdump: -p +#as: -mnan=2008 + +.*:.*file format.*mips.* +#failif +private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].* diff --git a/gas/testsuite/gas/mips/nan-legacy-3.d b/gas/testsuite/gas/mips/nan-legacy-3.d new file mode 100644 index 0000000000..649f0ee592 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-legacy-3.d @@ -0,0 +1,7 @@ +#name: MIPS legacy NaN setting 3 +#source: nan-legacy-override.s +#objdump: -p + +.*:.*file format.*mips.* +#failif +private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].* diff --git a/gas/testsuite/gas/mips/nan-legacy-4.d b/gas/testsuite/gas/mips/nan-legacy-4.d new file mode 100644 index 0000000000..3dc00cb219 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-legacy-4.d @@ -0,0 +1,8 @@ +#name: MIPS legacy NaN setting 4 +#source: empty.s +#objdump: -p +#as: -mnan=legacy + +.*:.*file format.*mips.* +#failif +private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].* diff --git a/gas/testsuite/gas/mips/nan-legacy-5.d b/gas/testsuite/gas/mips/nan-legacy-5.d new file mode 100644 index 0000000000..db3a954c65 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-legacy-5.d @@ -0,0 +1,7 @@ +#name: MIPS legacy NaN setting 5 +#source: empty.s +#objdump: -p + +.*:.*file format.*mips.* +#failif +private flags = [0-9a-f]*[4-7c-f]..: .*[[]nan2008[]].* diff --git a/gas/testsuite/gas/mips/nan-legacy-override.s b/gas/testsuite/gas/mips/nan-legacy-override.s new file mode 100644 index 0000000000..64b2c82355 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-legacy-override.s @@ -0,0 +1,2 @@ + .nan 2008 + .nan legacy diff --git a/gas/testsuite/gas/mips/nan-legacy.s b/gas/testsuite/gas/mips/nan-legacy.s new file mode 100644 index 0000000000..4c299f804b --- /dev/null +++ b/gas/testsuite/gas/mips/nan-legacy.s @@ -0,0 +1 @@ + .nan legacy |