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

« back to all changes in this revision

Viewing changes to binutils-2.23.52.20130611/gold/testsuite/arm_farcall_thumb_arm.sh

  • 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
#!/bin/sh
 
2
 
 
3
# arm_farcall_thumb_arm.sh -- a test case for Thumb->ARM farcall veneers.
 
4
 
 
5
# Copyright 2010, 2011, Free Software Foundation, Inc.
 
6
# Written by Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
 
7
# Based upon arm_cortex_a8.sh
 
8
# Written by Doug Kwan <dougkwan@google.com>.
 
9
 
 
10
# This file is part of gold.
 
11
 
 
12
# This program is free software; you can redistribute it and/or modify
 
13
# it under the terms of the GNU General Public License as published by
 
14
# the Free Software Foundation; either version 3 of the License, or
 
15
# (at your option) any later version.
 
16
 
 
17
# This program is distributed in the hope that it will be useful,
 
18
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
19
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
20
# GNU General Public License for more details.
 
21
 
 
22
# You should have received a copy of the GNU General Public License
 
23
# along with this program; if not, write to the Free Software
 
24
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
 
25
# MA 02110-1301, USA.
 
26
 
 
27
check()
 
28
{
 
29
    if ! grep -q "$2" "$1"
 
30
    then
 
31
        echo "Did not find expected instruction in $1:"
 
32
        echo "   $2"
 
33
        echo ""
 
34
        echo "Actual instructions below:"
 
35
        cat "$1"
 
36
        exit 1
 
37
    fi
 
38
}
 
39
 
 
40
# Thumb->ARM
 
41
check arm_farcall_thumb_arm.stdout "1f01018:    .*              bx      pc"
 
42
check arm_farcall_thumb_arm.stdout "1f0101a:    .*              nop"
 
43
check arm_farcall_thumb_arm.stdout "1f0101c:    f004 e51f"
 
44
check arm_farcall_thumb_arm.stdout "1f01020:    1014"
 
45
check arm_farcall_thumb_arm.stdout "1f01022:    0200"
 
46
 
 
47
check arm_farcall_thumb_arm.stdout "1f01024:    .*              bx      pc"
 
48
check arm_farcall_thumb_arm.stdout "1f01026:    .*              nop"
 
49
check arm_farcall_thumb_arm.stdout "1f01028:    fff9 ea03"
 
50
 
 
51
# Thumb->ARM with v5T interworking
 
52
check arm_farcall_thumb_arm_5t.stdout "1f01018: f004 e51f"
 
53
check arm_farcall_thumb_arm_5t.stdout "1f0101c: 1014"
 
54
check arm_farcall_thumb_arm_5t.stdout "1f0101e: 0200"
 
55
 
 
56
exit 0