arm_farcall_arm_arm.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/bin/sh
  2. # arm_farcall_arm_arm.sh -- a test case for ARM->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. # Check for ARM->ARM default
  33. check arm_farcall_arm_arm.stdout "1004: .* ldr pc, \[pc, #-4\] .*"
  34. check arm_farcall_arm_arm.stdout "1008: 02001020"
  35. exit 0