Revert "[mono][llvm] Enable the cold calling conv on osx/linux. (#83519)" (#85554)
authorZoltan Varga <vargaz@gmail.com>
Mon, 1 May 2023 15:42:23 +0000 (17:42 +0200)
committerGitHub <noreply@github.com>
Mon, 1 May 2023 15:42:23 +0000 (17:42 +0200)
This reverts commit a2acc6c6529fc25ed350b239efe459b08b0310a6.

Revert this as it causes an assert on osx.

src/mono/mono/mini/mini-llvm.c

index c8d4af7..c1cd999 100644 (file)
@@ -1220,12 +1220,6 @@ simd_op_to_llvm_type (int opcode)
 #endif
 }
 
-#if defined(TARGET_OSX) || defined(TARGET_LINUX)
-#define COLD_CCONV_SUPPORTED 1
-#elif !defined(TARGET_WATCHOS) && !defined(TARGET_ARM) && !defined(TARGET_ARM64)
-#define COLD_CCONV_SUPPORTED 1
-#endif
-
 static void
 set_cold_cconv (LLVMValueRef func)
 {
@@ -1233,7 +1227,7 @@ set_cold_cconv (LLVMValueRef func)
         * xcode10 (watchOS) and ARM/ARM64 doesn't seem to support preserveall, it fails with:
         * fatal error: error in backend: Unsupported calling convention
         */
-#ifdef COLD_CCONV_SUPPORTED
+#if !defined(TARGET_WATCHOS) && !defined(TARGET_ARM) && !defined(TARGET_ARM64)
        LLVMSetFunctionCallConv (func, LLVMColdCallConv);
 #endif
 }
@@ -1241,7 +1235,7 @@ set_cold_cconv (LLVMValueRef func)
 static void
 set_call_cold_cconv (LLVMValueRef func)
 {
-#ifdef COLD_CCONV_SUPPORTED
+#if !defined(TARGET_WATCHOS) && !defined(TARGET_ARM) && !defined(TARGET_ARM64)
        LLVMSetInstructionCallConv (func, LLVMColdCallConv);
 #endif
 }