arm_fix_1176.sh 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/sh
  2. # arm_fix_1176.sh -- a test case for the ARM1176 workaround.
  3. # Copyright (C) 2010-2022 Free Software Foundation, Inc.
  4. # Written by Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
  5. # Based upon arm_cortex_a8.sh
  6. # Written by Doug Kwan <dougkwan@google.com>.
  7. # This file is part of gold.
  8. # This program is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 3 of the License, or
  11. # (at your option) any later version.
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU General Public License for more details.
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  19. # MA 02110-1301, USA.
  20. # This file goes with arm_v4bx.s, an ARM assembly source file constructed to
  21. # have test the handling of R_ARM_V4BX relocation.
  22. check()
  23. {
  24. if ! grep -q "$2" "$1"
  25. then
  26. echo "Did not find expected instruction in $1:"
  27. echo " $2"
  28. echo ""
  29. echo "Actual instructions below:"
  30. cat "$1"
  31. exit 1
  32. fi
  33. }
  34. # Check for fix default state on v6Z.
  35. check arm_fix_1176_default_v6z.stdout "2001014: .* bl 2001018 <.*>"
  36. # Check for fix explicitly on on v6Z.
  37. check arm_fix_1176_on_v6z.stdout "2001014: .* bl 2001018 <.*>"
  38. # Check for explicitly off on v6Z
  39. check arm_fix_1176_off_v6z.stdout "2001014: .* blx 2001018 <.*>"
  40. # Check for fix default state on v5TE
  41. check arm_fix_1176_default_v5te.stdout "2001014: .* bl 2001018 <.*>"
  42. # Check for fix default state on v7A
  43. check arm_fix_1176_default_v7a.stdout "2001014: .* blx 2001018 <.*>"
  44. # Check for fix default state on ARM1156T2F-S
  45. check arm_fix_1176_default_1156t2f_s.stdout "2001014: .* blx 2001018 <.*>"
  46. exit 0