mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
7bc8414ee9
Only Linux is supported at the moment, and other platforms quickly fault. As a result these tests would fail on non-Linux hosts. It may be worth making the tests more generic again as more platforms are supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174170 91177308-0d34-0410-b5e6-96231b3b80d8
59 lines
1.6 KiB
LLVM
59 lines
1.6 KiB
LLVM
; RUN: llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu < %s | FileCheck %s
|
|
; RUN: llc -verify-machineinstrs -mtriple=aarch64-none-linux-gnu -disable-fp-elim < %s | FileCheck %s --check-prefix=CHECK-WITH-FP
|
|
|
|
@bigspace = global [8 x i64] zeroinitializer
|
|
|
|
declare void @use_addr(i8*)
|
|
|
|
define void @test_frame([8 x i64] %val) {
|
|
; CHECK: test_frame:
|
|
; CHECK: .cfi_startproc
|
|
|
|
%var = alloca i8, i32 1000000
|
|
; CHECK: sub sp, sp, #[[SP_INIT_ADJ:[0-9]+]]
|
|
; CHECK-NEXT: .Ltmp
|
|
; CHECK-NEXT: .cfi_def_cfa sp, [[SP_INIT_ADJ]]
|
|
|
|
; Make sure the prologue is reasonably efficient
|
|
; CHECK-NEXT: stp x29, x30, [sp,
|
|
; CHECK-NEXT: stp x25, x26, [sp,
|
|
; CHECK-NEXT: stp x23, x24, [sp,
|
|
; CHECK-NEXT: stp x21, x22, [sp,
|
|
; CHECK-NEXT: stp x19, x20, [sp,
|
|
; CHECK-NEXT: sub sp, sp, #160
|
|
; CHECK-NEXT: sub sp, sp, #244, lsl #12
|
|
; CHECK-NEXT: .Ltmp
|
|
; CHECK-NEXT: .cfi_def_cfa sp, 1000080
|
|
; CHECK-NEXT: .Ltmp
|
|
; CHECK-NEXT: .cfi_offset x30, -8
|
|
; CHECK-NEXT: .Ltmp
|
|
; CHECK-NEXT: .cfi_offset x29, -16
|
|
; [...]
|
|
; CHECK: .cfi_offset x19, -80
|
|
|
|
; CHECK: bl use_addr
|
|
call void @use_addr(i8* %var)
|
|
|
|
store [8 x i64] %val, [8 x i64]* @bigspace
|
|
ret void
|
|
; CHECK: ret
|
|
; CHECK: .cfi_endproc
|
|
}
|
|
|
|
; CHECK-WITH-FP: test_frame:
|
|
|
|
; CHECK-WITH-FP: sub sp, sp, #[[SP_INIT_ADJ:[0-9]+]]
|
|
; CHECK-WITH-FP-NEXT: .Ltmp
|
|
; CHECK-WITH-FP-NEXT: .cfi_def_cfa sp, [[SP_INIT_ADJ]]
|
|
|
|
; CHECK-WITH-FP: stp x29, x30, [sp, [[OFFSET:#[0-9]+]]]
|
|
; CHECK-WITH-FP-NEXT: add x29, sp, [[OFFSET]]
|
|
; CHECK-WITH-FP-NEXT: .Ltmp
|
|
; CHECK-WITH-FP-NEXT: .cfi_def_cfa x29, 16
|
|
|
|
; We shouldn't emit any kind of update for the second stack adjustment if the
|
|
; FP is in use.
|
|
; CHECK-WITH-FP-NOT: .cfi_def_cfa_offset
|
|
|
|
; CHECK-WITH-FP: bl use_addr
|