[docs] Enable documentation for mini.
[mono.git] / mono / mini / tramp-s390x.c
index 408997daace8d426c6ba6ffaf4a81c9b8eea032c..c89f2038b2047c1013a92b712a7c5359310229ea 100644 (file)
@@ -1,20 +1,19 @@
-/*------------------------------------------------------------------*/
-/*                                                                 */
-/* Name        - tramp-s390x.c                                     */
-/*                                                                 */
-/* Function    - JIT trampoline code for S/390.                     */
-/*                                                                 */
-/* Name               - Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com) */
-/*                                                                 */
-/* Date        - January, 2004                                     */
-/*                                                                 */
-/* Derivation  - From exceptions-x86 & exceptions-ppc              */
-/*              Paolo Molaro (lupus@ximian.com)                    */
-/*              Dietmar Maurer (dietmar@ximian.com)                */
-/*                                                                 */
-/* Copyright   - 2001 Ximian, Inc.                                 */
-/* Licensed under the MIT license. See LICENSE file in the project root for full license information.*/
-/*------------------------------------------------------------------*/
+/**
+ * \file
+ * Function    - JIT trampoline code for S/390.
+ *
+ * Name               - Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
+ *
+ * Date        - January, 2004
+ *
+ * Derivation  - From exceptions-x86 & exceptions-ppc
+ *              Paolo Molaro (lupus@ximian.com)
+ *              Dietmar Maurer (dietmar@ximian.com)
+ *
+ * Copyright   - 2001 Ximian, Inc.
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ *
+ */
 
 /*------------------------------------------------------------------*/
 /*                 D e f i n e s                                    */
@@ -603,7 +602,7 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m,
 static void
 handler_block_trampoline_helper (gpointer *ptr)
 {
-       MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
+       MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
        *ptr = jit_tls->handler_block_return_address;
 }
 
@@ -635,25 +634,12 @@ mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot)
         * then jumps into the code that deals with it.
         */
 
-       if (mono_get_jit_tls_offset () != -1) {
-               s390_ear  (code, s390_r1, 0);
-               s390_sllg (code, s390_r1, s390_r1, 0, 32);
-               s390_ear  (code, s390_r1, 1);
-               S390_SET  (code, s390_r14, mono_get_jit_tls_offset());
-               s390_lg   (code, s390_r14, s390_r1, 0, G_STRUCT_OFFSET(MonoJitTlsData, handler_block_return_address));
-               /* 
-                * Simulate a call 
-                */
-               S390_SET  (code, s390_r1, tramp);
-               s390_br   (code, s390_r1);
-       } else {
-               /*
-                * Slow path uses a C helper
-                */
-               S390_SET  (code, s390_r2, tramp);
-               S390_SET  (code, s390_r1, handler_block_trampoline_helper);
-               s390_br   (code, s390_r1);
-       }
+       /*
+        * Slow path uses a C helper
+        */
+       S390_SET  (code, s390_r2, tramp);
+       S390_SET  (code, s390_r1, handler_block_trampoline_helper);
+       s390_br   (code, s390_r1);
 
        mono_arch_flush_icache (buf, code - buf);
        mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);