blob: 083c526073ef9a8d04a1e17875b7498556767c37 [file] [log] [blame]
Jason Baronbf5438fc2010-09-17 11:09:00 -04001#!/bin/sh
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01002# SPDX-License-Identifier: GPL-2.0
Jonathan Neuschäferdf0a92c2011-06-16 00:17:46 +02003# Test for gcc 'asm goto' support
Jason Baronbf5438fc2010-09-17 11:09:00 -04004# Copyright (C) 2010, Jason Baron <jbaron@redhat.com>
5
Rabin Vincenta9468f32012-02-24 17:06:20 +01006cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y"
7int main(void)
8{
Jiang Liuf3c003f2014-01-07 22:17:12 +08009#if defined(__arm__) || defined(__aarch64__)
Rabin Vincenta9468f32012-02-24 17:06:20 +010010 /*
11 * Not related to asm goto, but used by jump label
12 * and broken on some ARM GCC versions (see GCC Bug 48637).
13 */
14 static struct { int dummy; int state; } tp;
15 asm (".long %c0" :: "i" (&tp.state));
16#endif
17
18entry:
19 asm goto ("" :::: entry);
20 return 0;
21}
22END