1 ; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s
2 ; RUN: llc < %s -mtriple=arm-linux-gnueabi | FileCheck %s
4 define i32 @get_stack() nounwind {
6 ; CHECK-LABEL: get_stack:
8 %sp = call i32 @llvm.read_register.i32(metadata !0)
12 define void @set_stack(i32 %val) nounwind {
14 ; CHECK-LABEL: set_stack:
16 call void @llvm.write_register.i32(metadata !0, i32 %val)
20 declare i32 @llvm.read_register.i32(metadata) nounwind
21 declare void @llvm.write_register.i32(metadata, i32) nounwind
23 ; register unsigned long current_stack_pointer asm("sp");
24 ; CHECK-NOT: .asciz "sp"