diff options
author | Tom Rix <trix@redhat.com> | 2001-06-20 13:34:10 +0000 |
---|---|---|
committer | Tom Rix <trix@redhat.com> | 2001-06-20 13:34:10 +0000 |
commit | 1ad63b2f000e4fea64a8fa6a11a3015aadd6e8fe (patch) | |
tree | 3cd51a4f6839101cc4113ff174f16def51bbcf52 /gas/testsuite | |
parent | 1fe213d94107550465599da19836632e0de4c020 (diff) | |
download | gdb-1ad63b2f000e4fea64a8fa6a11a3015aadd6e8fe.zip gdb-1ad63b2f000e4fea64a8fa6a11a3015aadd6e8fe.tar.gz gdb-1ad63b2f000e4fea64a8fa6a11a3015aadd6e8fe.tar.bz2 |
Fix for problem with default alignment of .comm
Diffstat (limited to 'gas/testsuite')
-rw-r--r-- | gas/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/aix.exp | 63 | ||||
-rw-r--r-- | gas/testsuite/gas/ppc/align.s | 6 |
3 files changed, 74 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 615b92c..441cbd9 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2001-06-18 Tom Rix <trix@redhat.com> + + * gas/ppc/aix.exp: New file, aix specific tests. + * gas/ppc/align.s: New file, .comm alignment test. + 2001-06-13 Andreas Jaeger <aj@suse.de> * gas/vtable/vtable.exp (run_list_test): Don't run on sparc64. diff --git a/gas/testsuite/gas/ppc/aix.exp b/gas/testsuite/gas/ppc/aix.exp new file mode 100644 index 0000000..46eeb3e --- /dev/null +++ b/gas/testsuite/gas/ppc/aix.exp @@ -0,0 +1,63 @@ +# Copyright (C) 2001 Free Software Foundation, Inc. +# Contributed by Red Hat + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# + +# +# Aix on PowerPC tests +# +proc do_align_test {} { + set testname "align.s: Alignment of symbols part 1" + set x0 0 + set x1 0 + set x2 0 + set x3 0 + set x4 0 + + set testname "align.s (part 2)" + + if [gas_test_old "align.s" "" "Alignment of symbols part 1"] { + objdump_start_no_subdir "a.out" "-t" + + while 1 { + expect { + -re "AUX val 16 prmhsh 0 snhsh 0 typ 3 algn 2 clss 5 stb 0 snstb 0" { set x0 1 } + -re "AUX val 32 prmhsh 0 snhsh 0 typ 3 algn 1 clss 5 stb 0 snstb 0" { set x1 1 } + -re "AUX val 64 prmhsh 0 snhsh 0 typ 3 algn 2 clss 5 stb 0 snstb 0" { set x2 1 } + -re "AUX val 128 prmhsh 0 snhsh 0 typ 3 algn 3 clss 5 stb 0 snstb 0" { set x3 1 } + -re "AUX val 256 prmhsh 0 snhsh 0 typ 3 algn 4 clss 5 stb 0 snstb 0" { set x4 1 } + -re "\[^\n\]*\n" { } + timeout { perror "timeout\n"; break } + eof { break } + } + } + + objdump_finish + + if [all_ones $x0 $x1 $x2 $x3 $x4] then { + pass $testname + } else { + fail $testname + } + } +} + + +if [istarget powerpc*-*-aix4.3*] then { + + # Make sure that symbols are correctly aligned + do_align_test +} diff --git a/gas/testsuite/gas/ppc/align.s b/gas/testsuite/gas/ppc/align.s new file mode 100644 index 0000000..fbb630a --- /dev/null +++ b/gas/testsuite/gas/ppc/align.s @@ -0,0 +1,6 @@ + .comm default_align_4,16 + .comm align_1,32,1 + .comm align_2,64,2 + .comm align_4,128,3 + .comm align_8,256,4 + |