summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMFastISel.cpp
diff options
context:
space:
mode:
authorJush Lu <jush.msn@gmail.com>2012-08-16 05:15:53 +0000
committerJush Lu <jush.msn@gmail.com>2012-08-16 05:15:53 +0000
commit2ff4e9d5afa2074b91940a601fba0a0c154f6a83 (patch)
treec122f7878a5744fbe27790517c55a1da7315756b /lib/Target/ARM/ARMFastISel.cpp
parent9418f176526623000f817c1dd696b14da3a471e9 (diff)
downloadllvm-2ff4e9d5afa2074b91940a601fba0a0c154f6a83.tar.gz
llvm-2ff4e9d5afa2074b91940a601fba0a0c154f6a83.tar.bz2
llvm-2ff4e9d5afa2074b91940a601fba0a0c154f6a83.tar.xz
[arm-fast-isel] Add support for fastcc.
Without fastcc support, the caller just falls through to CallingConv::C for fastcc, but callee still uses fastcc, this inconsistency of calling convention is a problem, and fastcc support can fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMFastISel.cpp')
-rw-r--r--lib/Target/ARM/ARMFastISel.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp
index 57f8116039..bf9d16eea1 100644
--- a/lib/Target/ARM/ARMFastISel.cpp
+++ b/lib/Target/ARM/ARMFastISel.cpp
@@ -1821,9 +1821,12 @@ CCAssignFn *ARMFastISel::CCAssignFnForCall(CallingConv::ID CC,
default:
llvm_unreachable("Unsupported calling convention");
case CallingConv::Fast:
- // Ignore fastcc. Silence compiler warnings.
- (void)RetFastCC_ARM_APCS;
- (void)FastCC_ARM_APCS;
+ if (Subtarget->hasVFP2() && !isVarArg) {
+ if (!Subtarget->isAAPCS_ABI())
+ return (Return ? RetFastCC_ARM_APCS : FastCC_ARM_APCS);
+ // For AAPCS ABI targets, just use VFP variant of the calling convention.
+ return (Return ? RetCC_ARM_AAPCS_VFP : CC_ARM_AAPCS_VFP);
+ }
// Fallthrough
case CallingConv::C:
// Use target triple & subtarget features to do actual dispatch.