Back to home page

LXR

 
 

    


0001 #!/bin/sh
0002 # Test for gcc 'asm goto' support
0003 # Copyright (C) 2010, Jason Baron <jbaron@redhat.com>
0004 
0005 cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
0006 int main(void)
0007 {
0008 #if defined(__arm__) || defined(__aarch64__)
0009         /*
0010          * Not related to asm goto, but used by jump label
0011          * and broken on some ARM GCC versions (see GCC Bug 48637).
0012          */
0013         static struct { int dummy; int state; } tp;
0014         asm (".long %c0" :: "i" (&tp.state));
0015 #endif
0016 
0017 entry:
0018         asm goto ("" :::: entry);
0019         return 0;
0020 }
0021 END