[gdb/tui] Introduce translate_acs
[binutils-gdb.git] / gold / testsuite / arm_farcall_arm_thumb.sh
blob4ed25522cc4545bbd3582454afe5d24c057672e3
1 #!/bin/sh
3 # arm_farcall_arm_thumb.sh -- a test case for ARM->Thumb farcall veneers.
5 # Copyright (C) 2010-2023 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>.
10 # This file is part of gold.
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.
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.
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.
27 check()
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
40 # Check for ARM->Thumb default
41 check arm_farcall_arm_thumb.stdout "1004: .* ldr ip, \[pc\]"
42 check arm_farcall_arm_thumb.stdout "1008: .* bx ip"
43 check arm_farcall_arm_thumb.stdout "100c: 02001015"
45 # Check for ARM->Thumb with v5t interworking
46 chck arm_farcall_arm_thumb_5t.stdout "1004: f004 e51f"
47 chck arm_farcall_arm_thumb_5t.stdout "1008: 1015"
48 chck arm_farcall_arm_thumb_5t.stdout "100a: 0200"
50 exit 0