Jason Baron | bf5438fc | 2010-09-17 11:09:00 -0400 | [diff] [blame] | 1 | #!/bin/sh |
Jonathan Neuschäfer | df0a92c | 2011-06-16 00:17:46 +0200 | [diff] [blame] | 2 | # Test for gcc 'asm goto' support |
Jason Baron | bf5438fc | 2010-09-17 11:09:00 -0400 | [diff] [blame] | 3 | # Copyright (C) 2010, Jason Baron <jbaron@redhat.com> |
| 4 | |
Rabin Vincent | a9468f3 | 2012-02-24 17:06:20 +0100 | [diff] [blame] | 5 | cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y" |
| 6 | int main(void) |
| 7 | { |
Jiang Liu | f3c003f | 2014-01-07 22:17:12 +0800 | [diff] [blame] | 8 | #if defined(__arm__) || defined(__aarch64__) |
Rabin Vincent | a9468f3 | 2012-02-24 17:06:20 +0100 | [diff] [blame] | 9 | /* |
| 10 | * Not related to asm goto, but used by jump label |
| 11 | * and broken on some ARM GCC versions (see GCC Bug 48637). |
| 12 | */ |
| 13 | static struct { int dummy; int state; } tp; |
| 14 | asm (".long %c0" :: "i" (&tp.state)); |
| 15 | #endif |
| 16 | |
| 17 | entry: |
| 18 | asm goto ("" :::: entry); |
| 19 | return 0; |
| 20 | } |
| 21 | END |