]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gold/testsuite/arm_farcall_thumb_thumb.sh
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / gold / testsuite / arm_farcall_thumb_thumb.sh
CommitLineData
cd6eab1c
ILT
1#!/bin/sh
2
3# arm_farcall_thumb_thumb.sh -- a test case for Thumb->Thumb farcall veneers.
4
250d07de 5# Copyright (C) 2010-2021 Free Software Foundation, Inc.
cd6eab1c
ILT
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
27check()
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->Thumb default
41check arm_farcall_thumb_thumb.stdout "1004: .* bx pc"
42check arm_farcall_thumb_thumb.stdout "1006: .* nop"
43check arm_farcall_thumb_thumb.stdout "1008: c000"
44check arm_farcall_thumb_thumb.stdout "100a: e59f"
45check arm_farcall_thumb_thumb.stdout "100c: ff1c e12f"
46check arm_farcall_thumb_thumb.stdout "1010: 1015"
47check arm_farcall_thumb_thumb.stdout "1012: 0200"
48
49# Thumb->Thumb with v5T interworking
50check arm_farcall_thumb_thumb_5t.stdout "1004: f004 e51f"
51check arm_farcall_thumb_thumb_5t.stdout "1008: 1015"
52check arm_farcall_thumb_thumb_5t.stdout "100a: 0200"
53
54# Thumb->Thumb on v6-M
55check arm_farcall_thumb_thumb_6m.stdout "1004: .* push {r0}"
56check arm_farcall_thumb_thumb_6m.stdout "1006: .* ldr r0, \\[pc, #8\\]"
57check arm_farcall_thumb_thumb_6m.stdout "1008: .* mov ip, r0"
58check arm_farcall_thumb_thumb_6m.stdout "100a: .* pop {r0}"
59check arm_farcall_thumb_thumb_6m.stdout "100c: .* bx ip"
60check arm_farcall_thumb_thumb_6m.stdout "100e: .* nop"
61check arm_farcall_thumb_thumb_6m.stdout "1010: 1015"
62check arm_farcall_thumb_thumb_6m.stdout "1012: 0200"
63
64# Thumb->Thumb on v7-M
65check arm_farcall_thumb_thumb_6m.stdout "1004: .* push {r0}"
66check arm_farcall_thumb_thumb_6m.stdout "1006: .* ldr r0, \\[pc, #8\\]"
67check arm_farcall_thumb_thumb_6m.stdout "1008: .* mov ip, r0"
68check arm_farcall_thumb_thumb_6m.stdout "100a: .* pop {r0}"
69check arm_farcall_thumb_thumb_6m.stdout "100c: .* bx ip"
70check arm_farcall_thumb_thumb_6m.stdout "100e: .* nop"
71check arm_farcall_thumb_thumb_6m.stdout "1010: 1015"
72check arm_farcall_thumb_thumb_6m.stdout "1012: 0200"
73
74exit 0