ARM: update subtarget information for Windows on ARM

Update the subtarget information for Windows on ARM.  This enables using the MC
layer to target Windows on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205459 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Saleem Abdulrasool
2014-04-02 20:32:05 +00:00
parent bc413d65a2
commit 396e5e328c
13 changed files with 157 additions and 16 deletions

View File

@@ -0,0 +1,16 @@
; RUN: llc -mtriple=thumbv7-windows-itanium -mcpu=cortex-a9 -o - %s | FileCheck %s
; AAPCS mandates an 8-byte stack alignment. The alloca is implicitly aligned,
; and no bic is required.
declare void @callee(i8 *%i)
define void @caller() {
%i = alloca i8, align 8
call void @callee(i8* %i)
ret void
}
; CHECK: sub sp, #8
; CHECK-NOT: bic

View File

@@ -0,0 +1,10 @@
; RUN: llc -mtriple=thumbv7-windows-itanium -mcpu=cortex-a9 -o - %s | FileCheck %s
define float @function(float %f, float %g) nounwind {
entry:
%h = fadd float %f, %g
ret float %h
}
; CHECK: vadd.f32 s0, s0, s1

View File

@@ -0,0 +1,9 @@
; RUN: llc -mtriple=thumbv7-windows -mcpu=cortex-a9 -o - %s | FileCheck %s
define void @function() nounwind {
entry:
ret void
}
; CHECK-LABEL: function

View File

@@ -0,0 +1,10 @@
; RUN: llc -mtriple=thumbv7-windows-itanium -mcpu=cortex-a9 -o - %s | FileCheck %s
define i32 @divide(i32 %i, i32 %j) nounwind {
entry:
%quotient = sdiv i32 %i, %j
ret i32 %quotient
}
; CHECK-NOT: __aeabi_idiv

View File

@@ -0,0 +1,5 @@
; RUN: not llc -mtriple=armv7-windows-itanium -mcpu=cortex-a9 -o /dev/null %s 2>&1 \
; RUN: | FileCheck %s
; CHECK: does not support ARM mode execution

View File

@@ -0,0 +1,21 @@
; RUN: llc -mtriple=thumbv7-windows -mcpu=cortex-a9 -o - %s | FileCheck %s
declare void @callee(i32 %i)
define i32 @caller(i32 %i, i32 %j, i32 %k, i32 %l, i32 %m, i32 %n, i32 %o,
i32 %p) {
entry:
%q = add nsw i32 %j, %i
%r = add nsw i32 %q, %k
%s = add nsw i32 %r, %l
call void @callee(i32 %s)
%t = add nsw i32 %n, %m
%u = add nsw i32 %t, %o
%v = add nsw i32 %u, %p
call void @callee(i32 %v)
%w = add nsw i32 %v, %s
ret i32 %w
}
; CHECK-NOT: .save {{{.*}}}