Commit | Line | Data |
---|---|---|
6f2750fe | 1 | # Copyright (C) 2012-2016 Free Software Foundation, Inc. |
5bf135a7 NC |
2 | |
3 | # This program is free software; you can redistribute it and/or modify | |
4 | # it under the terms of the GNU General Public License as published by | |
5 | # the Free Software Foundation; either version 3 of the License, or | |
6 | # (at your option) any later version. | |
7 | # | |
8 | # This program is distributed in the hope that it will be useful, | |
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | # GNU General Public License for more details. | |
12 | # | |
13 | # You should have received a copy of the GNU General Public License | |
14 | # along with this program; if not, write to the Free Software | |
15 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. | |
16 | ||
252b5132 RH |
17 | # Some generic SPARC and SPARC64 tests |
18 | ||
19 | # FIXME: The tests here aren't really bullet proof. A mistake in the opcode | |
20 | # table can slip through since we use the same table for assembly and | |
21 | # disassembly. The way to fix this is to include a hex dump of the insns | |
22 | # and test that as well. Later. | |
23 | ||
b3fb1136 RH |
24 | # Find out if these binutils are either sparc64*-*-* or |
25 | # sparc*-*-* with --enable-targets=sparc64-*-* | |
26 | proc gas_64_check { } { | |
27 | global NM | |
28 | global NMFLAGS | |
252b5132 | 29 | |
7f6a71ff JM |
30 | set status [gas_host_run "$NM $NMFLAGS --help" ""] |
31 | return [regexp "elf64\[_-\]sparc" [lindex $status 1]] | |
b3fb1136 | 32 | } |
252b5132 | 33 | |
96e97d9b | 34 | proc sparc_elf_setup { } { |
910600e9 | 35 | setup_xfail "sparc*-*-*aout*" "sparc*-*-sunos4*" |
96e97d9b AM |
36 | setup_xfail "sparc*-fujitsu-none" "sparc*-*-*n*bsd*" |
37 | setup_xfail "sparc*-*-coff" "sparc*-*-lynxos*" | |
38 | clear_xfail "sparc64*-*-*n*bsd*" | |
3dbe594b | 39 | clear_xfail "sparc*-*-netbsdelf*" |
96e97d9b AM |
40 | } |
41 | ||
b3fb1136 RH |
42 | if [istarget sparc*-*-*] { |
43 | run_dump_test "synth" | |
739f7f82 | 44 | # The next four tests are ELF only. |
96e97d9b | 45 | sparc_elf_setup |
0f2712ed | 46 | run_dump_test "unalign" |
96e97d9b | 47 | sparc_elf_setup |
bd5e6e7e | 48 | run_dump_test "pcrel" |
96e97d9b | 49 | sparc_elf_setup |
bd5e6e7e | 50 | run_dump_test "plt" |
739f7f82 DM |
51 | sparc_elf_setup |
52 | run_dump_test "gotop32" | |
b3fb1136 RH |
53 | if [gas_64_check] { |
54 | run_dump_test "asi" | |
55 | run_dump_test "membar" | |
56 | run_dump_test "prefetch" | |
57 | run_dump_test "set64" | |
58 | run_dump_test "synth64" | |
59 | run_dump_test "rdpr" | |
83d634e3 | 60 | run_dump_test "rdhpr" |
b3fb1136 | 61 | run_dump_test "wrpr" |
83d634e3 DM |
62 | run_dump_test "wrhpr" |
63 | run_dump_test "window" | |
b3fb1136 | 64 | run_dump_test "reloc64" |
bd5e6e7e JJ |
65 | run_dump_test "pcrel64" |
66 | run_dump_test "plt64" | |
739f7f82 | 67 | run_dump_test "gotop64" |
b3fb1136 | 68 | } |
f124dd4f | 69 | run_dump_test "imm-plus-rreg" |
9bf29d72 DM |
70 | run_dump_test "ticc-imm-reg" |
71 | run_dump_test "v8-movwr-imm" | |
8dbb9eb3 | 72 | run_dump_test "save-args" |
c699f087 JJ |
73 | run_dump_test "v9branch1" |
74 | run_dump_test "v9branch2" | |
75 | run_dump_test "v9branch3" | |
76 | run_dump_test "v9branch4" | |
77 | run_dump_test "v9branch5" | |
1a6b486f | 78 | run_dump_test "pc2210" |
ea783ef3 | 79 | run_dump_test "hpcvis3" |
e91d1076 | 80 | run_dump_test "ima" |
6cda1326 | 81 | run_dump_test "crypto" |
3d68f91c | 82 | run_dump_test "xcrypto" |
698544e1 | 83 | run_dump_test "cbcond" |
58004e23 | 84 | run_dump_test "pause" |
2e52845b | 85 | run_dump_test "cfr" |
0afd1215 DM |
86 | run_dump_test "ldtw_sttw" |
87 | run_dump_test "ldd_std" | |
14191abe JM |
88 | run_dump_test "ldx_stx" |
89 | run_dump_test "ldx_efsr" | |
90 | run_dump_test "ld_st_fsr" | |
0afd1215 DM |
91 | run_dump_test "edge" |
92 | run_dump_test "flush" | |
3d68f91c JM |
93 | run_dump_test "mwait" |
94 | run_dump_test "mcdper" | |
95 | run_dump_test "sparc5vis4" | |
f9911beb JM |
96 | run_dump_test "natural" |
97 | run_dump_test "natural-32" | |
dfeb0666 NC |
98 | |
99 | run_list_test "pr4587" "" | |
252b5132 RH |
100 | } |
101 | ||
910600e9 RS |
102 | if [istarget sparc-*-vxworks*] { |
103 | run_dump_test "vxworks-pic" | |
104 | } | |
105 | ||
252b5132 RH |
106 | if [istarget sparclet*-*-*] { |
107 | run_dump_test "splet" | |
108 | run_dump_test "splet-2" | |
109 | } |