mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-09 15:57:28 +00:00
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108059 91177308-0d34-0410-b5e6-96231b3b80d8
34 lines
710 B
LLVM
34 lines
710 B
LLVM
; RUN: llc -march=x86 -relocation-model=pic < %s
|
|
|
|
; This should use flds to set the return value.
|
|
; CHECK: test0:
|
|
; CHECK: flds
|
|
; CHECK: ret
|
|
@G = external global float
|
|
define float @test0() nounwind {
|
|
%t = load float* @G
|
|
ret float %t
|
|
}
|
|
|
|
; This should pop 4 bytes on return.
|
|
; CHECK: test1:
|
|
; CHECK: ret $4
|
|
define void @test1({i32, i32, i32, i32}* sret %p) nounwind {
|
|
store {i32, i32, i32, i32} zeroinitializer, {i32, i32, i32, i32}* %p
|
|
ret void
|
|
}
|
|
|
|
; Properly initialize the pic base.
|
|
; CHECK: test2:
|
|
; CHECK-NOT: HHH
|
|
; CHECK: call{{.*}}L2$pb
|
|
; CHECK-NEXT: L2$pb:
|
|
; CHECK-NEXT: pop
|
|
; CHECK: HHH
|
|
; CHECK: ret
|
|
@HHH = external global i32
|
|
define i32 @test2() nounwind {
|
|
%t = load i32* @HHH
|
|
ret i32 %t
|
|
}
|