summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86FastISel.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-11 00:22:57 +0000
committerChris Lattner <sabre@nondot.org>2010-03-11 00:22:57 +0000
commita179e4d0a8029bb4004d92343fb2c110f77060d7 (patch)
tree0c2f2ffe1996549308d8b14a9ada2f7fc326b6fc /llvm/lib/Target/X86/X86FastISel.cpp
parentaa87b4eab1ad673ec2cb5189e2cfc5776b2b35c8 (diff)
downloadbcm5719-llvm-a179e4d0a8029bb4004d92343fb2c110f77060d7.tar.gz
bcm5719-llvm-a179e4d0a8029bb4004d92343fb2c110f77060d7.zip
add support, testcases, and dox for the new GHC calling
convention. Patch by David Terei! llvm-svn: 98212
Diffstat (limited to 'llvm/lib/Target/X86/X86FastISel.cpp')
-rw-r--r--llvm/lib/Target/X86/X86FastISel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp
index 98e3f4efe58..27807f29024 100644
--- a/llvm/lib/Target/X86/X86FastISel.cpp
+++ b/llvm/lib/Target/X86/X86FastISel.cpp
@@ -172,7 +172,9 @@ bool X86FastISel::isTypeLegal(const Type *Ty, EVT &VT, bool AllowI1) {
CCAssignFn *X86FastISel::CCAssignFnForCall(CallingConv::ID CC,
bool isTaillCall) {
if (Subtarget->is64Bit()) {
- if (Subtarget->isTargetWin64())
+ if (CC == CallingConv::GHC)
+ return CC_X86_64_GHC;
+ else if (Subtarget->isTargetWin64())
return CC_X86_Win64_C;
else
return CC_X86_64_C;
@@ -182,6 +184,8 @@ CCAssignFn *X86FastISel::CCAssignFnForCall(CallingConv::ID CC,
return CC_X86_32_FastCall;
else if (CC == CallingConv::Fast)
return CC_X86_32_FastCC;
+ else if (CC == CallingConv::GHC)
+ return CC_X86_32_GHC;
else
return CC_X86_32_C;
}
OpenPOWER on IntegriCloud