summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmjad Aboud <amjad.aboud@intel.com>2016-03-03 17:17:54 +0000
committerAmjad Aboud <amjad.aboud@intel.com>2016-03-03 17:17:54 +0000
commit0ce261d052c83800b37de1b51e82e4ee139734f0 (patch)
tree39331d45b1af7bc66c7e066e3476733643d2c354
parent671795a9855fdb74bd18d963137a006ced9d92aa (diff)
downloadbcm5719-llvm-0ce261d052c83800b37de1b51e82e4ee139734f0.tar.gz
bcm5719-llvm-0ce261d052c83800b37de1b51e82e4ee139734f0.zip
MCU target has its own ABI, however X86 interrupt handler calling convention overrides this ABI.
Fixed the ordering to check first for X86 interrupt handler then for MCU target. Differential Revision: http://reviews.llvm.org/D17801 llvm-svn: 262628
-rw-r--r--llvm/lib/Target/X86/X86CallingConv.td4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86CallingConv.td b/llvm/lib/Target/X86/X86CallingConv.td
index ed2e8806716..471a1828306 100644
--- a/llvm/lib/Target/X86/X86CallingConv.td
+++ b/llvm/lib/Target/X86/X86CallingConv.td
@@ -770,6 +770,9 @@ def CC_X86_64_Intr : CallingConv<[
// This is the root argument convention for the X86-32 backend.
def CC_X86_32 : CallingConv<[
+ // X86_INTR calling convention is valid in MCU target and should override the
+ // MCU calling convention. Thus, this should be checked before isTargetMCU().
+ CCIfCC<"CallingConv::X86_INTR", CCDelegateTo<CC_X86_32_Intr>>,
CCIfSubtarget<"isTargetMCU()", CCDelegateTo<CC_X86_32_MCU>>,
CCIfCC<"CallingConv::X86_FastCall", CCDelegateTo<CC_X86_32_FastCall>>,
CCIfCC<"CallingConv::X86_VectorCall", CCDelegateTo<CC_X86_32_VectorCall>>,
@@ -777,7 +780,6 @@ def CC_X86_32 : CallingConv<[
CCIfCC<"CallingConv::Fast", CCDelegateTo<CC_X86_32_FastCC>>,
CCIfCC<"CallingConv::GHC", CCDelegateTo<CC_X86_32_GHC>>,
CCIfCC<"CallingConv::HiPE", CCDelegateTo<CC_X86_32_HiPE>>,
- CCIfCC<"CallingConv::X86_INTR", CCDelegateTo<CC_X86_32_Intr>>,
// Otherwise, drop to normal X86-32 CC
CCDelegateTo<CC_X86_32_C>
OpenPOWER on IntegriCloud