mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
This patch adds support for AArch64 (ARM's 64-bit architecture) to LLVM in the "experimental" category. Currently, it won't be built unless requested explicitly. This initial commit should have support for: + Assembly of all scalar (i.e. non-NEON, non-Crypto) instructions (except the late addition CRC instructions). + CodeGen features required for C++03 and C99. + Compilation for the "small" memory model: code+static data < 4GB. + Absolute and position-independent code. + GNU-style (i.e. "__thread") TLS. + Debugging information. The principal omission, currently, is performance tuning. This patch excludes the NEON support also reviewed due to an outbreak of batshit insanity in our legal department. That will be committed soon bringing the changes to precisely what has been approved. Further reviews would be gratefully received. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174054 91177308-0d34-0410-b5e6-96231b3b80d8
59 lines
1.6 KiB
LLVM
59 lines
1.6 KiB
LLVM
; RUN: llc -verify-machineinstrs -march aarch64 < %s | FileCheck %s
|
|
; RUN: llc -verify-machineinstrs -march aarch64 -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
|