mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
0aba46f4cd
The ARM backend has been using most of the MachO related subtarget checks almost interchangeably, and since the only target it's had to run on has been IOS (which is all three of MachO, Darwin and IOS) it's worked out OK so far. But we'd like to support embedded targets under the "*-*-none-macho" triple, which means everything starts falling apart and inconsistent behaviours emerge. This patch should pick a reasonably sensible set of behaviours for the new triple (and any others that come along, with luck). Some choices were debatable (notably FP == r7 or r11), but we can revisit those later when deficiencies become apparent. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198617 91177308-0d34-0410-b5e6-96231b3b80d8
34 lines
1.4 KiB
LLVM
34 lines
1.4 KiB
LLVM
; RUN: llc < %s -mtriple=armv7-apple-ios -o - | FileCheck %s
|
|
; RUN: llc < %s -mtriple=thumbv7m-none-macho -o - | FileCheck %s --check-prefix=DARWIN
|
|
; RUN: llc < %s -mtriple=arm-none-eabi -o - | FileCheck --check-prefix=EABI %s
|
|
; RUN: llc < %s -mtriple=arm-none-eabihf -o - | FileCheck --check-prefix=EABI %s
|
|
|
|
@from = common global [500 x i32] zeroinitializer, align 4
|
|
@to = common global [500 x i32] zeroinitializer, align 4
|
|
|
|
define void @f() {
|
|
entry:
|
|
|
|
; CHECK: memmove
|
|
; EABI: __aeabi_memmove
|
|
call void @llvm.memmove.p0i8.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0, i1 false)
|
|
|
|
; CHECK: memcpy
|
|
; EABI: __aeabi_memcpy
|
|
call void @llvm.memcpy.p0i8.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8* bitcast ([500 x i32]* @to to i8*), i32 500, i32 0, i1 false)
|
|
|
|
; EABI memset swaps arguments
|
|
; CHECK: mov r1, #0
|
|
; CHECK: memset
|
|
; DARWIN: movs r1, #0
|
|
; DARWIN: memset
|
|
; EABI: mov r2, #0
|
|
; EABI: __aeabi_memset
|
|
call void @llvm.memset.p0i8.i32(i8* bitcast ([500 x i32]* @from to i8*), i8 0, i32 500, i32 0, i1 false)
|
|
unreachable
|
|
}
|
|
|
|
declare void @llvm.memmove.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
|
|
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
|
|
declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
|