]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gas/testsuite/gas/sparc/sparc.exp
gas,opcodes: fix hardware capabilities bumping in the sparc assembler.
[thirdparty/binutils-gdb.git] / gas / testsuite / gas / sparc / sparc.exp
1 # Copyright (C) 2012-2016 Free Software Foundation, Inc.
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
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
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
29
30 set status [gas_host_run "$NM $NMFLAGS --help" ""]
31 return [regexp "elf64\[_-\]sparc" [lindex $status 1]]
32 }
33
34 if [istarget sparc*-*-*] {
35
36 if [is_elf_format] {
37 # The next five tests are ELF only.
38 run_dump_test "unalign"
39 run_dump_test "pcrel"
40 run_dump_test "plt"
41 run_dump_test "gotop32"
42 run_dump_test "pc2210"
43 # The features tested in the tests below are not ELF-specific.
44 # However, these features are not present in practice in COFF
45 # and a.out targets. Running them only in ELF targets allows
46 # us to don't have to replicate pattern test files as that
47 # would bring no practical advantage.
48 run_dump_test "natural"
49 run_dump_test "natural-32"
50 run_list_test "pr4587" ""
51 run_dump_test "ticc-imm-reg"
52 run_dump_test "v8-movwr-imm"
53 run_dump_test "pause"
54 run_dump_test "save-args"
55 run_dump_test "cbcond"
56 run_dump_test "cfr"
57 run_dump_test "crypto"
58 run_dump_test "edge"
59 run_dump_test "flush"
60 run_dump_test "hpcvis3"
61 run_dump_test "ima"
62 run_dump_test "ld_st_fsr"
63 run_dump_test "ldtw_sttw"
64 run_dump_test "ldd_std"
65 run_dump_test "ldx_stx"
66 run_dump_test "ldx_efsr"
67 run_dump_test "mwait"
68 run_dump_test "mcdper"
69 run_dump_test "sparc5vis4"
70 run_dump_test "xcrypto"
71 run_dump_test "v9branch1"
72 run_dump_test "imm-plus-rreg"
73 run_dump_test "dcti-couples-v9"
74 }
75
76 if [gas_64_check] {
77 run_dump_test "asi"
78 run_dump_test "membar"
79 run_dump_test "prefetch"
80 run_dump_test "set64"
81 run_dump_test "synth64"
82 run_dump_test "rdasr"
83 run_dump_test "rdpr"
84 run_dump_test "rdhpr"
85 run_dump_test "wrasr"
86 run_dump_test "wrpr"
87 run_dump_test "wrhpr"
88 run_dump_test "window"
89 run_dump_test "reloc64"
90 run_dump_test "pcrel64"
91 run_dump_test "plt64"
92 run_dump_test "gotop64"
93 run_list_test "hwcaps-bump" "-bump"
94 }
95
96 run_dump_test "synth"
97 run_dump_test "v9branch2"
98 run_dump_test "v9branch3"
99 run_dump_test "v9branch4"
100 run_dump_test "v9branch5"
101 run_dump_test "pr19910-1"
102 run_list_test "pr19910-2"
103 run_dump_test "dcti-couples-v8"
104 run_dump_test "dcti-couples-v9c"
105 run_dump_test "pr20732"
106 }
107
108 if [istarget sparc-*-vxworks*] {
109 run_dump_test "vxworks-pic"
110 }
111
112 if [istarget sparclet*-*-*] {
113 run_dump_test "splet"
114 run_dump_test "splet-2"
115 }