blob: 8b980fb2270a3be231588a7365bdc904755a5bbd [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
Masahiro Yamadae9666d12018-12-31 00:14:15 +09006cat << "END" | $@ -x c - -fno-PIE -c -o /dev/null
Rabin Vincenta9468f32012-02-24 17:06:20 +01007int 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