diff options
author | Tanya Lattner <tonic@nondot.org> | 2010-03-11 23:59:04 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2010-03-11 23:59:04 +0000 |
commit | 0d80090979b98a11764a740aee2c94dae42c077b (patch) | |
tree | 24eea8254f47714fbb3c8d3f550cfb88ac4eb1dc /lib/Target/X86/X86FastISel.cpp | |
parent | bf9f9dae76eca9d61bed8f1cf7f95c481af96fd9 (diff) |
Merge 98212 from mainline.
add support, testcases, and dox for the new GHC calling
convention. Patch by David Terei!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@98307 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86FastISel.cpp')
-rw-r--r-- | lib/Target/X86/X86FastISel.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp index 98e3f4efe5..27807f2902 100644 --- a/lib/Target/X86/X86FastISel.cpp +++ b/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; } |