xref: /aosp_15_r20/external/llvm/test/MC/AsmParser/hello.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -triple i386-apple-darwin9 %s -o -
2*9880d681SAndroid Build Coastguard Worker// RUN: llvm-mc -triple i386-apple-darwin9 %s -o - -output-asm-variant=1
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker	.text
5*9880d681SAndroid Build Coastguard Worker	.align	4,0x90
6*9880d681SAndroid Build Coastguard Worker	.globl	_main
7*9880d681SAndroid Build Coastguard Worker_main:
8*9880d681SAndroid Build Coastguard Worker	pushl	%ebp
9*9880d681SAndroid Build Coastguard Worker	movl	%esp, %ebp
10*9880d681SAndroid Build Coastguard Worker	subl	$8, %esp
11*9880d681SAndroid Build Coastguard Worker	call	"L1$pb"
12*9880d681SAndroid Build Coastguard Worker"L1$pb":
13*9880d681SAndroid Build Coastguard Worker	popl	%eax
14*9880d681SAndroid Build Coastguard Worker	movl	$0, -4(%ebp)
15*9880d681SAndroid Build Coastguard Worker	movl	%esp, %ecx
16*9880d681SAndroid Build Coastguard Worker	leal	L_.str-"L1$pb"(%eax), %eax
17*9880d681SAndroid Build Coastguard Worker	movl	%eax, (%ecx)
18*9880d681SAndroid Build Coastguard Worker	call	_printf
19*9880d681SAndroid Build Coastguard Worker	movl	$0, -4(%ebp)
20*9880d681SAndroid Build Coastguard Worker	movl	-4(%ebp), %eax
21*9880d681SAndroid Build Coastguard Worker	addl	$8, %esp
22*9880d681SAndroid Build Coastguard Worker	popl	%ebp
23*9880d681SAndroid Build Coastguard Worker	//ret
24*9880d681SAndroid Build Coastguard Worker	.subsections_via_symbols
25*9880d681SAndroid Build Coastguard Worker	.cstring
26*9880d681SAndroid Build Coastguard WorkerL_.str:
27*9880d681SAndroid Build Coastguard Worker	.asciz	"hello world!\n"
28*9880d681SAndroid Build Coastguard Worker
29