| Newsgroups |
gmane.comp.gnome.mono.patches |
| Message-ID |
<00000142700adfcf-2f6a1ae8-e7c6-4d0c-9b36-b0c482a6b340-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/12153dd3e6af...3a9ccd06832f
Commit: 3a9ccd06832f28954340754400468f8a7ff1c11f
Author: Zoltan Varga <[email protected]> (vargaz)
Date: 2013-11-19 11:05:04 GMT
URL: https://github.com/mono/mono/commit/3a9ccd06832f28954340754400468f8a7ff1c11f
[llvm] Implement support for OP_TLS_GET_REG on osx/amd64.
Changed paths:
M mono/mini/mini-llvm.c
Modified: mono/mini/mini-llvm.c
===================================================================
@@ -3354,6 +3354,22 @@
break;
}
+ case OP_TLS_GET_REG: {
+#if defined(TARGET_AMD64) && defined(TARGET_OSX)
+ /* See emit_tls_get_reg () */
+ LLVMValueRef base, shifted_offset, offset;
+
+ base = LLVMConstInt (LLVMInt32Type (), mono_amd64_get_tls_gs_offset (), TRUE);
+ shifted_offset = LLVMBuildMul (builder, convert (ctx, lhs, LLVMInt32Type ()), LLVMConstInt (LLVMInt32Type (), 8, TRUE), "");
+ offset = LLVMBuildAdd (builder, base, shifted_offset, "");
+ // 256 == GS segment register
+ LLVMTypeRef ptrtype = LLVMPointerType (IntPtrType (), 256);
+ values [ins->dreg] = LLVMBuildLoad (builder, LLVMBuildIntToPtr (builder, offset, ptrtype, ""), "");
+#else
+ LLVM_FAILURE (ctx, "opcode tls-get");
+#endif
+ break;
+ }
/*
* Overflow opcodes.
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches