[WebAssembly] Add several more calling conventions to the supported list.
authorDan Gohman <dan433584@gmail.com>
Fri, 4 Dec 2015 18:27:03 +0000 (18:27 +0000)
committerDan Gohman <dan433584@gmail.com>
Fri, 4 Dec 2015 18:27:03 +0000 (18:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254741 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/WebAssembly/WebAssemblyISelLowering.cpp

index b651855eea7a25d244e7273a3e305ae6c9c6cc9b..a7eba5611134274d70a1333ab56cebbbccaf141f 100644 (file)
@@ -260,9 +260,14 @@ static void fail(SDLoc DL, SelectionDAG &DAG, const char *msg) {
 // Test whether the given calling convention is supported.
 static bool CallingConvSupported(CallingConv::ID CallConv) {
   // We currently support the language-independent target-independent
 // Test whether the given calling convention is supported.
 static bool CallingConvSupported(CallingConv::ID CallConv) {
   // We currently support the language-independent target-independent
-  // conventions.
+  // conventions. We don't yet have a way to annotate calls with properties like
+  // "cold", and we don't have any call-clobbered registers, so these are mostly
+  // all handled the same.
   return CallConv == CallingConv::C || CallConv == CallingConv::Fast ||
   return CallConv == CallingConv::C || CallConv == CallingConv::Fast ||
-         CallConv == CallingConv::Cold;
+         CallConv == CallingConv::Cold ||
+         CallConv == CallingConv::PreserveMost ||
+         CallConv == CallingConv::PreserveAll ||
+         CallConv == CallingConv::CXX_FAST_TLS;
 }
 
 SDValue
 }
 
 SDValue