]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gas/testsuite/gas/ppc/aix.exp
2.41 Release sources
[thirdparty/binutils-gdb.git] / gas / testsuite / gas / ppc / aix.exp
1 # Copyright (C) 2001-2023 Free Software Foundation, Inc.
2 # Contributed by Red Hat
3
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18
19 #
20 # Aix on PowerPC tests
21 #
22 proc do_align_test {} {
23 set testname "align.s: Alignment of symbols part 1"
24 set x0 0
25 set x1 0
26 set x2 0
27 set x3 0
28 set x4 0
29
30 set testname "align.s (part 2)"
31
32 if [gas_test_old "align.s" "" "Alignment of symbols part 1"] {
33 objdump_start_no_subdir "a.out" "-t"
34
35 while 1 {
36 expect {
37 -re "AUX val 16 prmhsh 0 snhsh 0 typ 3 algn 2 clss 5 stb 0 snstb 0" { set x0 1 }
38 -re "AUX val 32 prmhsh 0 snhsh 0 typ 3 algn 1 clss 5 stb 0 snstb 0" { set x1 1 }
39 -re "AUX val 64 prmhsh 0 snhsh 0 typ 3 algn 2 clss 5 stb 0 snstb 0" { set x2 1 }
40 -re "AUX val 128 prmhsh 0 snhsh 0 typ 3 algn 3 clss 5 stb 0 snstb 0" { set x3 1 }
41 -re "AUX val 256 prmhsh 0 snhsh 0 typ 3 algn 4 clss 5 stb 0 snstb 0" { set x4 1 }
42 -re "\[^\n\]*\n" { }
43 timeout { perror "timeout\n"; break }
44 eof { break }
45 }
46 }
47
48 objdump_finish
49
50 if [all_ones $x0 $x1 $x2 $x3 $x4] then {
51 pass $testname
52 } else {
53 fail $testname
54 }
55 }
56 }
57
58
59 if { [istarget "powerpc*-*-aix*"] || [istarget "rs6000-*-aix*"] } then {
60
61 # Make sure that symbols are correctly aligned
62 do_align_test
63
64 run_dump_test "textalign-xcoff-001"
65 run_dump_test "textalign-xcoff-002"
66 run_dump_test "xcoff-branch-1-32"
67 run_dump_test "xcoff-branch-1-64"
68 run_dump_test "xcoff-br16-1"
69 run_dump_test "xcoff-br16-2"
70 run_dump_test "xcoff-toc-1"
71
72 run_list_test "xcoff-ref-1"
73
74 run_dump_test "xcoff-dwsect-1-32"
75 run_dump_test "xcoff-dwsect-1-64"
76 run_dump_test "xcoff-dwsect-2-32"
77 run_dump_test "xcoff-dwsect-2-64"
78
79 run_dump_test "xcoff-function-1-32"
80 run_dump_test "xcoff-function-1-64"
81
82 run_dump_test "xcoff-tls-32"
83 run_dump_test "xcoff-tls-64"
84
85 run_dump_test "xcoff-stsym-32"
86 run_dump_test "xcoff-stsym-64"
87
88 run_dump_test "xcoff-file-32"
89 run_dump_test "xcoff-file-64"
90
91 run_dump_test "xcoff-visibility-1-32"
92 run_dump_test "xcoff-visibility-1-64"
93 run_dump_test "xcoff-visibility-2-32"
94 run_dump_test "xcoff-visibility-2-64"
95 }