2016-08-04 02:17:35 +08:00
|
|
|
; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep mflr
|
|
|
|
; RUN: llc -verify-machineinstrs < %s -march=ppc32 | grep lwz
|
|
|
|
; RUN: llc -verify-machineinstrs < %s -march=ppc64 | grep "ld r., 16(r1)"
|
2007-12-08 14:59:59 +08:00
|
|
|
|
|
|
|
target triple = "powerpc-apple-darwin8"
|
|
|
|
|
2010-03-01 04:36:49 +08:00
|
|
|
define void @foo(i8** %X) nounwind {
|
2007-12-08 14:59:59 +08:00
|
|
|
entry:
|
|
|
|
%tmp = tail call i8* @llvm.returnaddress( i32 0 ) ; <i8*> [#uses=1]
|
|
|
|
store i8* %tmp, i8** %X, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare i8* @llvm.returnaddress(i32)
|
|
|
|
|