~ubuntu-branches/ubuntu/utopic/binutils-arm64-cross/utopic

« back to all changes in this revision

Viewing changes to binutils-2.23.52.20130611/gas/testsuite/gas/ppc/aix.exp

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-06-20 17:38:09 UTC
  • Revision ID: package-import@ubuntu.com-20130620173809-app8lzgvymy5fg6c
Tags: 0.7
Build-depend on binutils-source (>= 2.23.52.20130620-1~).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2001, 2002, 2005, 2007, 2009 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-ibm-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
 
 
69
    run_list_test "xcoff-ref-1"
 
70
 
 
71
    run_dump_test "xcoff-dwsect-1-32"
 
72
    run_dump_test "xcoff-dwsect-1-64"
 
73
}