diff options
author | Jush Lu <jush.msn@gmail.com> | 2012-08-16 05:15:53 +0000 |
---|---|---|
committer | Jush Lu <jush.msn@gmail.com> | 2012-08-16 05:15:53 +0000 |
commit | 2ff4e9d5afa2074b91940a601fba0a0c154f6a83 (patch) | |
tree | c122f7878a5744fbe27790517c55a1da7315756b /lib | |
parent | 9418f176526623000f817c1dd696b14da3a471e9 (diff) | |
download | external_llvm-2ff4e9d5afa2074b91940a601fba0a0c154f6a83.zip external_llvm-2ff4e9d5afa2074b91940a601fba0a0c154f6a83.tar.gz external_llvm-2ff4e9d5afa2074b91940a601fba0a0c154f6a83.tar.bz2 |
[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')
-rw-r--r-- | lib/Target/ARM/ARMFastISel.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp index 57f8116..bf9d16e 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. |