mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-16 11:30:51 +00:00
a72ec5517f
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193626 91177308-0d34-0410-b5e6-96231b3b80d8
22 lines
507 B
LLVM
22 lines
507 B
LLVM
; RUN: llc < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
|
|
|
|
define i8* @rt0(i32 %x) nounwind readnone {
|
|
entry:
|
|
; CHECK-LABEL: rt0:
|
|
; CHECK: mov x0, x30
|
|
%0 = tail call i8* @llvm.returnaddress(i32 0)
|
|
ret i8* %0
|
|
}
|
|
|
|
define i8* @rt2() nounwind readnone {
|
|
entry:
|
|
; CHECK-LABEL: rt2:
|
|
; CHECK: ldr x[[reg:[0-9]+]], [x29]
|
|
; CHECK: ldr x[[reg]], [x[[reg]]]
|
|
; CHECK: ldr x0, [x[[reg]], #8]
|
|
%0 = tail call i8* @llvm.returnaddress(i32 2)
|
|
ret i8* %0
|
|
}
|
|
|
|
declare i8* @llvm.returnaddress(i32) nounwind readnone
|