1 #!/bin/sh 2 3 # arm_fix_1176.sh -- a test case for the ARM1176 workaround. 4 5 # Copyright (C) 2010-2014 Free Software Foundation, Inc. 6 # Written by Matthew Gretton-Dann <matthew.gretton-dann (at] arm.com> 7 # Based upon arm_cortex_a8.sh 8 # Written by Doug Kwan <dougkwan (at] 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 # This file goes with arm_v4bx.s, an ARM assembly source file constructed to 28 # have test the handling of R_ARM_V4BX relocation. 29 30 check() 31 { 32 if ! grep -q "$2" "$1" 33 then 34 echo "Did not find expected instruction in $1:" 35 echo " $2" 36 echo "" 37 echo "Actual instructions below:" 38 cat "$1" 39 exit 1 40 fi 41 } 42 43 # Check for fix default state on v6Z. 44 check arm_fix_1176_default_v6z.stdout "2001014: .* bl 2001018 <.*>" 45 46 # Check for fix explicitly on on v6Z. 47 check arm_fix_1176_on_v6z.stdout "2001014: .* bl 2001018 <.*>" 48 49 # Check for explicitly off on v6Z 50 check arm_fix_1176_off_v6z.stdout "2001014: .* blx 2001018 <.*>" 51 52 # Check for fix default state on v5TE 53 check arm_fix_1176_default_v5te.stdout "2001014: .* bl 2001018 <.*>" 54 55 # Check for fix default state on v7A 56 check arm_fix_1176_default_v7a.stdout "2001014: .* blx 2001018 <.*>" 57 58 # Check for fix default state on ARM1156T2F-S 59 check arm_fix_1176_default_1156t2f_s.stdout "2001014: .* blx 2001018 <.*>" 60 61 exit 0 62