mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Fix ARM hasFP() semantics. It should return true whenever FP register is
reserved, not available for general allocation. This eliminates all the extra checks for Darwin. This change also fixes the use of FP to access frame indices in leaf functions and cleaned up some confusing code in epilogue emission. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110655 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,20 +1,35 @@
|
||||
; RUN: llc < %s -march=thumb | grep {ldr.*LCP} | count 5
|
||||
; RUN: llc < %s -mtriple=thumb-apple-darwin | FileCheck %s
|
||||
|
||||
define void @test1() {
|
||||
; CHECK: test1:
|
||||
; CHECK: sub sp, #256
|
||||
; CHECK: add sp, #256
|
||||
%tmp = alloca [ 64 x i32 ] , align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @test2() {
|
||||
; CHECK: test2:
|
||||
; CHECK: ldr r0, LCPI
|
||||
; CHECK: add sp, r0
|
||||
; CHECK: mov sp, r7
|
||||
; CHECK: sub sp, #4
|
||||
%tmp = alloca [ 4168 x i8 ] , align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
define i32 @test3() {
|
||||
%retval = alloca i32, align 4
|
||||
%tmp = alloca i32, align 4
|
||||
%a = alloca [805306369 x i8], align 16
|
||||
store i32 0, i32* %tmp
|
||||
%tmp1 = load i32* %tmp
|
||||
ret i32 %tmp1
|
||||
; CHECK: test3:
|
||||
; CHECK: ldr r1, LCPI
|
||||
; CHECK: add sp, r1
|
||||
; CHECK: ldr r1, LCPI
|
||||
; CHECK: add r1, sp
|
||||
; CHECK: mov sp, r7
|
||||
; CHECK: sub sp, #4
|
||||
%retval = alloca i32, align 4
|
||||
%tmp = alloca i32, align 4
|
||||
%a = alloca [805306369 x i8], align 16
|
||||
store i32 0, i32* %tmp
|
||||
%tmp1 = load i32* %tmp
|
||||
ret i32 %tmp1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user