arm_farcall_thumb_arm.sh 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/sh
  2. # arm_farcall_thumb_arm.sh -- a test case for Thumb->ARM farcall veneers.
  3. # Copyright (C) 2010-2015 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. check()
  21. {
  22. if ! grep -q "$2" "$1"
  23. then
  24. echo "Did not find expected instruction in $1:"
  25. echo " $2"
  26. echo ""
  27. echo "Actual instructions below:"
  28. cat "$1"
  29. exit 1
  30. fi
  31. }
  32. # Thumb->ARM
  33. check arm_farcall_thumb_arm.stdout "1f01018: .* bx pc"
  34. check arm_farcall_thumb_arm.stdout "1f0101a: .* nop"
  35. check arm_farcall_thumb_arm.stdout "1f0101c: f004 e51f"
  36. check arm_farcall_thumb_arm.stdout "1f01020: 1014"
  37. check arm_farcall_thumb_arm.stdout "1f01022: 0200"
  38. check arm_farcall_thumb_arm.stdout "1f01024: .* bx pc"
  39. check arm_farcall_thumb_arm.stdout "1f01026: .* nop"
  40. check arm_farcall_thumb_arm.stdout "1f01028: fff9 ea03"
  41. # Thumb->ARM with v5T interworking
  42. check arm_farcall_thumb_arm_5t.stdout "1f01018: f004 e51f"
  43. check arm_farcall_thumb_arm_5t.stdout "1f0101c: 1014"
  44. check arm_farcall_thumb_arm_5t.stdout "1f0101e: 0200"
  45. exit 0