summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86CallingConv.h
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2013-11-08 23:28:16 +0000
committerJuergen Ributzka <juergen@apple.com>2013-11-08 23:28:16 +0000
commit623d2e618f4e672c47edff9ec63ed6d733ac81d3 (patch)
treeb979de9c381f0ca66085b02e248b2fe3b9c50966 /lib/Target/X86/X86CallingConv.h
parentd900b1179535298510490030a5d2ecce93f79eb0 (diff)
downloadllvm-623d2e618f4e672c47edff9ec63ed6d733ac81d3.tar.gz
llvm-623d2e618f4e672c47edff9ec63ed6d733ac81d3.tar.bz2
llvm-623d2e618f4e672c47edff9ec63ed6d733ac81d3.tar.xz
[Stackmap] Add AnyReg calling convention support for patchpoint intrinsic.
The idea of the AnyReg Calling Convention is to provide the call arguments in registers, but not to force them to be placed in a paticular order into a specified set of registers. Instead it is up tp the register allocator to assign any register as it sees fit. The same applies to the return value (if applicable). Differential Revision: http://llvm-reviews.chandlerc.com/D2009 Reviewed by Andy git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194293 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86CallingConv.h')
-rw-r--r--lib/Target/X86/X86CallingConv.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/Target/X86/X86CallingConv.h b/lib/Target/X86/X86CallingConv.h
new file mode 100644
index 0000000000..e76f9fda2d
--- /dev/null
+++ b/lib/Target/X86/X86CallingConv.h
@@ -0,0 +1,35 @@
+//=== X86CallingConv.h - X86 Custom Calling Convention Routines -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains the custom routines for the X86 Calling Convention that
+// aren't done by tablegen.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef X86CALLINGCONV_H
+#define X86CALLINGCONV_H
+
+#include "llvm/CodeGen/CallingConvLower.h"
+#include "llvm/IR/CallingConv.h"
+
+namespace llvm {
+
+inline bool CC_X86_AnyReg_Error(unsigned &, MVT &, MVT &,
+ CCValAssign::LocInfo &, ISD::ArgFlagsTy &,
+ CCState &) {
+ llvm_unreachable("The AnyReg calling convention is only supported by the " \
+ "stackmap and patchpoint intrinsics.");
+ // gracefully fallback to X86 C calling convention on Release builds.
+ return false;
+}
+
+} // End llvm namespace
+
+#endif
+