[mono/mono] 12153dd3: [llvm] Pass the type token index to throw_corlib_exception on amd64 too.

"Zoltan Varga ([email protected])" <[email protected]> Tue, 19 Nov 2013 10:46:00 +0000
Newsgroups gmane.comp.gnome.mono.patches
Message-ID <000001426ff7800b-5accab92-1fe3-483d-8f01-da6a73e3b87d-000000@email.amazonses.com>
   Branch: refs/heads/master
     Home: https://github.com/mono/mono
  Compare: https://github.com/mono/mono/compare/77e28973ac06...12153dd3e6af

   Commit: 12153dd3e6af34ae99650b35f449f68838ce9771
   Author: Zoltan Varga <[email protected]> (vargaz)
     Date: 2013-11-19 10:44:53 GMT
      URL: https://github.com/mono/mono/commit/12153dd3e6af34ae99650b35f449f68838ce9771

[llvm] Pass the type token index to throw_corlib_exception on amd64 too.

Changed paths:
  M mono/mini/mini-llvm.c

Modified: mono/mini/mini-llvm.c
===================================================================
@@ -148,6 +148,12 @@
 #define IS_TARGET_X86 0
 #endif
 
+#ifdef TARGET_AMD64
+#define IS_TARGET_AMD64 1
+#else
+#define IS_TARGET_AMD64 0
+#endif
+
 #define LLVM_FAILURE(ctx, reason) do { \
 	TRACE_FAILURE (reason); \
 	(ctx)->cfg->exception_message = g_strdup (reason); \
@@ -1539,7 +1545,7 @@
 		ctx->lmodule->throw_corlib_exception = callee;
 	}
 
-	if (IS_TARGET_X86)
+	if (IS_TARGET_X86 || IS_TARGET_AMD64)
 		args [0] = LLVMConstInt (LLVMInt32Type (), exc_class->type_token - MONO_TOKEN_TYPE_DEF, FALSE);
 	else
 		args [0] = LLVMConstInt (LLVMInt32Type (), exc_class->type_token, FALSE);


_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches