Home | History | Annotate | Download | only in AArch64
      1 ; RUN: llc < %s -mtriple=arm64-apple-ios7.0 -disable-post-ra | FileCheck %s
      2 ; RUN: llc < %s -mtriple=arm64-linux-gnu -disable-post-ra | FileCheck %s --check-prefix=CHECK-LINUX
      3 
      4 ; CHECK-LABEL: main:
      5 ; CHECK:	stp	x29, x30, [sp, #-16]!
      6 ; CHECK-NEXT:	mov	x29, sp
      7 ; CHECK-NEXT:	sub	sp, sp, #16
      8 ; CHECK-NEXT:	stur	wzr, [x29, #-4]
      9 ; CHECK:	adrp	x0, L_.str@PAGE
     10 ; CHECK:	add	x0, x0, L_.str@PAGEOFF
     11 ; CHECK-NEXT:	bl	_puts
     12 ; CHECK-NEXT:	mov	sp, x29
     13 ; CHECK-NEXT:	ldp	x29, x30, [sp], #16
     14 ; CHECK-NEXT:	ret
     15 
     16 ; CHECK-LINUX-LABEL: main:
     17 ; CHECK-LINUX:	stp	x29, x30, [sp, #-16]!
     18 ; CHECK-LINUX-NEXT:	mov	x29, sp
     19 ; CHECK-LINUX-NEXT:	sub	sp, sp, #16
     20 ; CHECK-LINUX-NEXT:	stur	wzr, [x29, #-4]
     21 ; CHECK-LINUX:	adrp	x0, .L.str
     22 ; CHECK-LINUX:	add	x0, x0, :lo12:.L.str
     23 ; CHECK-LINUX-NEXT:	bl	puts
     24 ; CHECK-LINUX-NEXT:	mov	sp, x29
     25 ; CHECK-LINUX-NEXT:	ldp	x29, x30, [sp], #16
     26 ; CHECK-LINUX-NEXT:	ret
     27 
     28 @.str = private unnamed_addr constant [7 x i8] c"hello\0A\00"
     29 
     30 define i32 @main() nounwind ssp {
     31 entry:
     32   %retval = alloca i32, align 4
     33   store i32 0, i32* %retval
     34   %call = call i32 @puts(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0))
     35   ret i32 %call
     36 }
     37 
     38 declare i32 @puts(i8*)
     39