diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2013-07-12 15:58:15 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2013-07-12 15:58:15 +0000 |
commit | ba92f8875272b3d30872644d5305868ff4d047b8 (patch) | |
tree | 77c84c712c3409bc45868cdb86a58a00e95760fb /gas/testsuite | |
parent | 627e05482b7a540b8453a196d03e15cce03a4e40 (diff) | |
download | gdb-ba92f8875272b3d30872644d5305868ff4d047b8.zip gdb-ba92f8875272b3d30872644d5305868ff4d047b8.tar.gz gdb-ba92f8875272b3d30872644d5305868ff4d047b8.tar.bz2 |
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 8deb0d7..882bcc6 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 673b1d7..73127dd 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 0000000..3649fd2 --- /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 0000000..e8a07ce --- /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 0000000..7c3c4a3 --- /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 0000000..22ba87f --- /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 0000000..ec6d6b8 --- /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 0000000..9a3875e --- /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 0000000..470bf9c --- /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 0000000..c6f64c3 --- /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 0000000..2182615 --- /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 0000000..dc87e66 --- /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 0000000..4dcb93c --- /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 0000000..6ad4dce --- /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 0000000..649f0ee --- /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 0000000..3dc00cb --- /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 0000000..db3a954 --- /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 0000000..64b2c82 --- /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 0000000..4c299f8 --- /dev/null +++ b/gas/testsuite/gas/mips/nan-legacy.s @@ -0,0 +1 @@ + .nan legacy |