xref: /llvm-project/clang/test/CodeGen/AArch64/inlineasm-ios.c (revision 207e5ccceec8d3cc3f32723e78f2a142bc61b07d)
1*207e5cccSFangrui Song // REQUIRES: aarch64-registered-target
2*207e5cccSFangrui Song // RUN: %clang_cc1 -triple arm64-apple-ios -S -o - %s | FileCheck %s
3*207e5cccSFangrui Song 
4*207e5cccSFangrui Song // CHECK:       _restartable_function:
5*207e5cccSFangrui Song // CHECK-NEXT:  	ldr	x11, [x0]
6*207e5cccSFangrui Song // CHECK-NEXT:  	add	x11, x11, #1
7*207e5cccSFangrui Song // CHECK-NEXT:  	str	x11, [x0]
8*207e5cccSFangrui Song // CHECK-NEXT:  Ltmp0:
9*207e5cccSFangrui Song // CHECK-NEXT:  	b	Ltmp0
10*207e5cccSFangrui Song // CHECK-NEXT:  LExit_restartable_function:
11*207e5cccSFangrui Song // CHECK-NEXT:  	ret
12*207e5cccSFangrui Song asm(".align 4\n"
13*207e5cccSFangrui Song     "    .text\n"
14*207e5cccSFangrui Song     "    .private_extern _restartable_function\n"
15*207e5cccSFangrui Song     "_restartable_function:\n"
16*207e5cccSFangrui Song     "    ldr    x11, [x0]\n"
17*207e5cccSFangrui Song     "    add    x11, x11, #1\n"
18*207e5cccSFangrui Song     "    str    x11, [x0]\n"
19*207e5cccSFangrui Song     "1:\n"
20*207e5cccSFangrui Song     "    b 1b\n"
21*207e5cccSFangrui Song     "LExit_restartable_function:\n"
22*207e5cccSFangrui Song     "    ret\n"
23*207e5cccSFangrui Song );
24