summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
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
commit26088cb30ef45f2ca8a9915a12bb831654f5b81f (patch)
treed822ee1a137dda1bff04410d5832199aa6ad3080 /llvm/lib/Target
parentaf3e98347f0e78feb20cb3c508c60a55dab54325 (diff)
downloadbcm5719-llvm-26088cb30ef45f2ca8a9915a12bb831654f5b81f.tar.gz
bcm5719-llvm-26088cb30ef45f2ca8a9915a12bb831654f5b81f.zip
[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. llvm-svn: 162013
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/ARM/ARMFastISel.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp
index 57f81160394..bf9d16eea18 100644
--- a/llvm/lib/Target/ARM/ARMFastISel.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud