aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMFastISel.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-08-19 10:31:50 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-08-19 10:31:50 +0000
commit902a7b529820e6a0aa85f98f21afaeb1805a22f8 (patch)
treee7da40d2f6ef824f7371860826845870e6e1dcd5 /lib/Target/ARM/ARMFastISel.cpp
parent58b69754af0cbff56b1cfce9be9392e4451f6628 (diff)
downloadsrc-902a7b529820e6a0aa85f98f21afaeb1805a22f8.tar.gz
src-902a7b529820e6a0aa85f98f21afaeb1805a22f8.zip
Vendor import of llvm trunk r162107:vendor/llvm/llvm-trunk-r162107
Notes
Notes: svn path=/vendor/llvm/dist/; revision=239390 svn path=/vendor/llvm/llvm-trunk-r162107/; revision=239391; tag=vendor/llvm/llvm-trunk-r162107
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 57f811603945..bf9d16eea181 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.