1 /*------------------------------------------------------------------*/
3 /* Name - tramp-s390x.c */
5 /* Function - JIT trampoline code for S/390. */
7 /* Name - Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com) */
9 /* Date - January, 2004 */
11 /* Derivation - From exceptions-x86 & exceptions-ppc */
12 /* Paolo Molaro (lupus@ximian.com) */
13 /* Dietmar Maurer (dietmar@ximian.com) */
15 /* Copyright - 2001 Ximian, Inc. */
17 /*------------------------------------------------------------------*/
19 /*------------------------------------------------------------------*/
21 /*------------------------------------------------------------------*/
23 #define GR_SAVE_SIZE 4*sizeof(long)
24 #define FP_SAVE_SIZE 16*sizeof(double)
25 #define METHOD_SAVE_OFFSET S390_MINIMAL_STACK_SIZE
26 #define CREATE_GR_OFFSET METHOD_SAVE_OFFSET+8
27 #define CREATE_FP_OFFSET CREATE_GR_OFFSET+GR_SAVE_SIZE
28 #define CREATE_LMF_OFFSET CREATE_FP_OFFSET+FP_SAVE_SIZE
29 #define CREATE_STACK_SIZE (CREATE_LMF_OFFSET+2*sizeof(long)+sizeof(MonoLMF))
30 #define GENERIC_REG_OFFSET CREATE_STACK_SIZE + \
31 S390_REG_SAVE_OFFSET + \
34 /*------------------------------------------------------------------*/
35 /* Method-specific trampoline code fragment sizes */
36 /*------------------------------------------------------------------*/
37 #define SPECIFIC_TRAMPOLINE_SIZE 96
39 /*========================= End of Defines =========================*/
41 /*------------------------------------------------------------------*/
43 /*------------------------------------------------------------------*/
49 #include <mono/metadata/abi-details.h>
50 #include <mono/metadata/appdomain.h>
51 #include <mono/metadata/marshal.h>
52 #include <mono/metadata/tabledefs.h>
53 #include <mono/metadata/profiler-private.h>
54 #include <mono/arch/s390x/s390x-codegen.h>
57 #include "mini-s390x.h"
58 #include "support-s390x.h"
60 /*========================= End of Includes ========================*/
62 /*------------------------------------------------------------------*/
64 /*------------------------------------------------------------------*/
66 /*========================= End of Typedefs ========================*/
68 /*------------------------------------------------------------------*/
69 /* P r o t o t y p e s */
70 /*------------------------------------------------------------------*/
72 /*========================= End of Prototypes ======================*/
74 /*------------------------------------------------------------------*/
75 /* G l o b a l V a r i a b l e s */
76 /*------------------------------------------------------------------*/
79 /*====================== End of Global Variables ===================*/
81 /*------------------------------------------------------------------*/
83 /* Name - mono_arch_get_unbox_trampoline */
85 /* Function - Return a pointer to a trampoline which does the */
86 /* unboxing before calling the method. */
88 /* When value type methods are called through the */
89 /* vtable we need to unbox the 'this' argument. */
91 /* Parameters - method - Methd pointer */
92 /* addr - Pointer to native code for method */
94 /*------------------------------------------------------------------*/
97 mono_arch_get_unbox_trampoline (MonoMethod *method, gpointer addr)
100 int this_pos = s390_r2;
101 MonoDomain *domain = mono_domain_get ();
103 start = code = mono_domain_code_reserve (domain, 28);
105 S390_SET (code, s390_r1, addr);
106 s390_aghi (code, this_pos, sizeof(MonoObject));
107 s390_br (code, s390_r1);
109 g_assert ((code - start) <= 28);
111 mono_arch_flush_icache (start, code - start);
112 mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_UNBOX_TRAMPOLINE, method);
117 /*========================= End of Function ========================*/
119 /*------------------------------------------------------------------*/
121 /* Name - mono_arch_patch_callsite */
123 /* Function - Patch a non-virtual callsite so it calls @addr. */
125 /*------------------------------------------------------------------*/
128 mono_arch_patch_callsite (guint8 *method_start, guint8 *orig_code, guint8 *addr)
131 unsigned short opcode;
133 opcode = *((unsigned short *) (orig_code - 2));
134 if (opcode == 0x0dee) {
135 /* This should be a 'iihf/iilf' sequence */
136 S390_EMIT_CALL((orig_code - 14), addr);
137 mono_arch_flush_icache (orig_code - 14, 12);
139 /* This is the 'brasl' instruction */
141 displace = ((gssize) addr - (gssize) (orig_code - 2)) / 2;
142 s390_patch_rel (orig_code, displace);
143 mono_arch_flush_icache (orig_code, 4);
147 /*========================= End of Function ========================*/
149 /*------------------------------------------------------------------*/
151 /* Name - mono_arch_patch_plt_entry. */
153 /* Function - Patch a PLT entry - unused as yet. */
155 /*------------------------------------------------------------------*/
158 mono_arch_patch_plt_entry (guint8 *code, gpointer *got, mgreg_t *regs, guint8 *addr)
160 g_assert_not_reached ();
163 /*========================= End of Function ========================*/
165 /*------------------------------------------------------------------*/
167 /* Name - mono_arch_nullify_class_init_trampoline */
169 /* Function - Nullify a call which calls a class init trampoline*/
171 /*------------------------------------------------------------------*/
174 mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
176 char patch[2] = {0x07, 0x00};
180 memcpy(code, patch, sizeof(patch));
183 /*========================= End of Function ========================*/
185 /*------------------------------------------------------------------*/
187 /* Name - mono_arch_get_nullified_class_init */
189 /* Function - Nullify a PLT entry call. */
191 /*------------------------------------------------------------------*/
194 mono_arch_get_nullified_class_init_trampoline (MonoTrampInfo **info)
198 code = buf = mono_global_codeman_reserve (16);
200 s390_br (code, s390_r14);
202 mono_arch_flush_icache (buf, code - buf);
203 mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
206 *info = mono_tramp_info_create ("nullified_class_init_trampoline",
207 buf, code - buf, NULL, NULL);
212 /*========================= End of Function ========================*/
214 /*------------------------------------------------------------------*/
216 /* Name - mono_arch_create_trampoline_code */
218 /* Function - Create the designated type of trampoline according*/
219 /* to the 'tramp_type' parameter. */
221 /*------------------------------------------------------------------*/
224 mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
227 guint8 *buf, *tramp, *code;
228 int i, offset, lmfOffset, has_caller;
229 GSList *unwind_ops = NULL;
230 MonoJumpInfo *ji = NULL;
234 /* Now we'll create in 'buf' the S/390 trampoline code. This
235 is the trampoline code common to all methods */
237 code = buf = mono_global_codeman_reserve(512);
239 if ((tramp_type == MONO_TRAMPOLINE_JUMP) ||
240 (tramp_type == MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD))
245 /*-----------------------------------------------------------
246 STEP 0: First create a non-standard function prologue with a
247 stack size big enough to save our registers.
248 -----------------------------------------------------------*/
250 s390_stmg (buf, s390_r6, s390_r15, STK_BASE, S390_REG_SAVE_OFFSET);
251 s390_lgr (buf, s390_r11, s390_r15);
252 s390_aghi (buf, STK_BASE, -CREATE_STACK_SIZE);
253 s390_stg (buf, s390_r11, 0, STK_BASE, 0);
254 s390_stg (buf, s390_r1, 0, STK_BASE, METHOD_SAVE_OFFSET);
255 s390_stmg (buf, s390_r2, s390_r5, STK_BASE, CREATE_GR_OFFSET);
257 /* Save the FP registers */
258 offset = CREATE_FP_OFFSET;
259 for (i = s390_f0; i <= s390_f15; ++i) {
260 s390_std (buf, i, 0, STK_BASE, offset);
264 /*----------------------------------------------------------
265 STEP 1: call 'mono_get_lmf_addr()' to get the address of our
266 LMF. We'll need to restore it after the call to
267 's390_magic_trampoline' and before the call to the native
269 ----------------------------------------------------------*/
271 S390_SET (buf, s390_r1, mono_get_lmf_addr);
272 s390_basr (buf, s390_r14, s390_r1);
274 /*---------------------------------------------------------------*/
275 /* we build the MonoLMF structure on the stack - see mini-s390.h */
276 /* Keep in sync with the code in mono_arch_emit_prolog */
277 /*---------------------------------------------------------------*/
278 lmfOffset = CREATE_STACK_SIZE - sizeof(MonoLMF);
280 s390_lgr (buf, s390_r13, STK_BASE);
281 s390_aghi (buf, s390_r13, lmfOffset);
283 /*---------------------------------------------------------------*/
284 /* Set lmf.lmf_addr = jit_tls->lmf */
285 /*---------------------------------------------------------------*/
286 s390_stg (buf, s390_r2, 0, s390_r13,
287 G_STRUCT_OFFSET(MonoLMF, lmf_addr));
289 /*---------------------------------------------------------------*/
290 /* Get current lmf */
291 /*---------------------------------------------------------------*/
292 s390_lg (buf, s390_r0, 0, s390_r2, 0);
294 /*---------------------------------------------------------------*/
295 /* Set our lmf as the current lmf */
296 /*---------------------------------------------------------------*/
297 s390_stg (buf, s390_r13, 0, s390_r2, 0);
299 /*---------------------------------------------------------------*/
300 /* Have our lmf.previous_lmf point to the last lmf */
301 /*---------------------------------------------------------------*/
302 s390_stg (buf, s390_r0, 0, s390_r13,
303 G_STRUCT_OFFSET(MonoLMF, previous_lmf));
305 /*---------------------------------------------------------------*/
306 /* save method info */
307 /*---------------------------------------------------------------*/
308 s390_lg (buf, s390_r1, 0, STK_BASE, METHOD_SAVE_OFFSET);
309 s390_stg (buf, s390_r1, 0, s390_r13,
310 G_STRUCT_OFFSET(MonoLMF, method));
312 /*---------------------------------------------------------------*/
313 /* save the current SP */
314 /*---------------------------------------------------------------*/
315 s390_lg (buf, s390_r1, 0, STK_BASE, 0);
316 s390_stg (buf, s390_r1, 0, s390_r13, G_STRUCT_OFFSET(MonoLMF, ebp));
318 /*---------------------------------------------------------------*/
319 /* save the current IP */
320 /*---------------------------------------------------------------*/
322 s390_lg (buf, s390_r1, 0, s390_r1, S390_RET_ADDR_OFFSET);
324 s390_lghi (buf, s390_r1, 0);
326 s390_stg (buf, s390_r1, 0, s390_r13, G_STRUCT_OFFSET(MonoLMF, eip));
328 /*---------------------------------------------------------------*/
329 /* Save general and floating point registers */
330 /*---------------------------------------------------------------*/
331 s390_mvc (buf, 4*sizeof(gulong), s390_r13, G_STRUCT_OFFSET(MonoLMF, gregs[2]),
332 STK_BASE, CREATE_GR_OFFSET);
333 s390_mvc (buf, 10*sizeof(gulong), s390_r13, G_STRUCT_OFFSET(MonoLMF, gregs[6]),
334 s390_r11, S390_REG_SAVE_OFFSET);
336 /* Simply copy fpregs already saved above */
337 s390_mvc (buf, 16*sizeof(double), s390_r13, G_STRUCT_OFFSET(MonoLMF, fregs[0]),
338 STK_BASE, CREATE_FP_OFFSET);
340 /*---------------------------------------------------------------*/
341 /* STEP 2: call the C trampoline function */
342 /*---------------------------------------------------------------*/
346 /* Arg 1: mgreg_t *regs. We pass sp instead */
347 s390_la (buf, s390_r2, 0, STK_BASE, CREATE_STACK_SIZE);
349 /* Arg 2: code (next address to the instruction that called us) */
351 s390_lg (buf, s390_r3, 0, s390_r11, S390_RET_ADDR_OFFSET);
353 s390_lghi (buf, s390_r3, 0);
356 /* Arg 3: Trampoline argument */
357 if (tramp_type == MONO_TRAMPOLINE_GENERIC_CLASS_INIT)
358 s390_lg (buf, s390_r4, 0, STK_BASE, GENERIC_REG_OFFSET);
360 s390_lg (buf, s390_r4, 0, STK_BASE, METHOD_SAVE_OFFSET);
362 /* Arg 4: trampoline address. Ignore for now */
364 /* Calculate call address and call the C trampoline. Return value will be in r2 */
365 tramp = (guint8*)mono_get_trampoline_func (tramp_type);
366 S390_SET (buf, s390_r1, tramp);
367 s390_basr (buf, s390_r14, s390_r1);
369 /* OK, code address is now on r2. Move it to r1, so that we
370 can restore r2 and use it from r1 later */
371 s390_lgr (buf, s390_r1, s390_r2);
373 /*----------------------------------------------------------
374 STEP 3: Restore the LMF
375 ----------------------------------------------------------*/
376 restoreLMF(buf, STK_BASE, CREATE_STACK_SIZE);
378 /*----------------------------------------------------------
379 STEP 4: call the compiled method
380 ----------------------------------------------------------*/
382 /* Restore registers */
384 s390_lmg (buf, s390_r2, s390_r5, STK_BASE, CREATE_GR_OFFSET);
386 /* Restore the FP registers */
387 offset = CREATE_FP_OFFSET;
388 for (i = s390_f0; i <= s390_f15; ++i) {
389 s390_ld (buf, i, 0, STK_BASE, offset);
393 /* Restore stack pointer and jump to the code -
394 R14 contains the return address to our caller */
395 s390_lgr (buf, STK_BASE, s390_r11);
396 s390_lmg (buf, s390_r6, s390_r14, STK_BASE, S390_REG_SAVE_OFFSET);
398 if (MONO_TRAMPOLINE_TYPE_MUST_RETURN(tramp_type)) {
399 s390_lgr (buf, s390_r2, s390_r1);
400 s390_br (buf, s390_r14);
402 s390_br (buf, s390_r1);
405 /* Flush instruction cache, since we've generated code */
406 mono_arch_flush_icache (code, buf - code);
407 mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
410 tramp_name = mono_get_generic_trampoline_name (tramp_type);
411 *info = mono_tramp_info_create (tramp_name, buf, buf - code, ji, unwind_ops);
416 g_assert ((buf - code) <= 512);
421 /*========================= End of Function ========================*/
423 /*------------------------------------------------------------------*/
425 /* Name - mono_arch_invalidate_method */
429 /*------------------------------------------------------------------*/
432 mono_arch_invalidate_method (MonoJitInfo *ji, void *func, gpointer func_arg)
434 /* FIXME: This is not thread safe */
435 guint8 *code = ji->code_start;
437 S390_SET (code, s390_r1, func);
438 S390_SET (code, s390_r2, func_arg);
439 s390_br (code, s390_r1);
443 /*========================= End of Function ========================*/
445 /*------------------------------------------------------------------*/
447 /* Name - mono_arch_create_specific_trampoline */
449 /* Function - Creates the given kind of specific trampoline */
451 /*------------------------------------------------------------------*/
454 mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_type, MonoDomain *domain, guint32 *code_len)
456 guint8 *code, *buf, *tramp;
459 tramp = mono_get_trampoline_code (tramp_type);
461 /*----------------------------------------------------------*/
462 /* This is the method-specific part of the trampoline. Its */
463 /* purpose is to provide the generic part with the */
464 /* MonoMethod *method pointer. We'll use r1 to keep it. */
465 /*----------------------------------------------------------*/
466 code = buf = mono_domain_code_reserve (domain, SPECIFIC_TRAMPOLINE_SIZE);
468 S390_SET (buf, s390_r1, arg1);
469 displace = (tramp - buf) / 2;
470 s390_jg (buf, displace);
472 /* Flush instruction cache, since we've generated code */
473 mono_arch_flush_icache (code, buf - code);
474 mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_SPECIFIC_TRAMPOLINE,
475 (void *) mono_get_generic_trampoline_simple_name (tramp_type));
478 g_assert ((buf - code) <= SPECIFIC_TRAMPOLINE_SIZE);
481 *code_len = buf - code;
486 /*========================= End of Function ========================*/
488 /*------------------------------------------------------------------*/
490 /* Name - mono_arch_create_rgctx_lazy_fetch_trampoline */
494 /*------------------------------------------------------------------*/
497 mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
499 #ifdef MONO_ARCH_VTABLE_REG
502 guint8 **rgctx_null_jumps;
510 MonoJumpInfo *ji = NULL;
511 GSList *unwind_ops = NULL;
513 mrgctx = MONO_RGCTX_SLOT_IS_MRGCTX (slot);
514 index = MONO_RGCTX_SLOT_INDEX (slot);
516 index += MONO_SIZEOF_METHOD_RUNTIME_GENERIC_CONTEXT / sizeof (gpointer);
517 for (depth = 0; ; ++depth) {
518 int size = mono_class_rgctx_get_array_size (depth, mrgctx);
520 if (index < size - 1)
525 tramp_size = 48 + 16 * depth;
531 code = buf = mono_global_codeman_reserve (tramp_size);
533 unwind_ops = mono_arch_get_cie_program ();
535 rgctx_null_jumps = g_malloc (sizeof (guint8*) * (depth + 2));
539 s390_lgr (code, s390_r1, s390_r2);
541 /* load rgctx ptr from vtable */
542 s390_lg (code, s390_r1, 0, s390_r2, MONO_STRUCT_OFFSET(MonoVTable, runtime_generic_context));
543 /* is the rgctx ptr null? */
544 s390_ltgr (code, s390_r1, s390_r1);
545 /* if yes, jump to actual trampoline */
546 rgctx_null_jumps [iPatch++] = code;
550 for (i = 0; i < depth; ++i) {
551 /* load ptr to next array */
552 if (mrgctx && i == 0)
553 s390_lg (code, s390_r1, 0, s390_r1, MONO_SIZEOF_METHOD_RUNTIME_GENERIC_CONTEXT);
555 s390_lg (code, s390_r1, 0, s390_r1, 0);
556 s390_ltgr (code, s390_r1, s390_r1);
557 /* if the ptr is null then jump to actual trampoline */
558 rgctx_null_jumps [iPatch++] = code;
563 s390_lg (code, s390_r1, 0, s390_r1, (sizeof (gpointer) * (index + 1)));
564 /* is the slot null? */
565 s390_ltgr (code, s390_r1, s390_r1);
566 /* if yes, jump to actual trampoline */
567 rgctx_null_jumps [iPatch++] = code;
569 /* otherwise return r1 */
570 s390_lgr (code, s390_r2, s390_r1);
571 s390_br (code, s390_r14);
573 for (i = 0; i < iPatch; i++) {
574 displace = ((uintptr_t) code - (uintptr_t) rgctx_null_jumps[i]) / 2;
575 s390_patch_rel ((rgctx_null_jumps [i] + 2), displace);
578 g_free (rgctx_null_jumps);
580 /* move the rgctx pointer to the VTABLE register */
581 s390_lgr (code, MONO_ARCH_VTABLE_REG, s390_r2);
583 tramp = mono_arch_create_specific_trampoline (GUINT_TO_POINTER (slot),
584 MONO_TRAMPOLINE_RGCTX_LAZY_FETCH, mono_get_root_domain (), NULL);
586 /* jump to the actual trampoline */
587 displace = (tramp - code) / 2;
588 s390_jg (code, displace);
590 mono_arch_flush_icache (buf, code - buf);
591 mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
593 g_assert (code - buf <= tramp_size);
596 char *name = mono_get_rgctx_fetch_trampoline_name (slot);
597 *info = mono_tramp_info_create (name, buf, code - buf, ji, unwind_ops);
603 g_assert_not_reached ();
608 /*========================= End of Function ========================*/
610 /*------------------------------------------------------------------*/
612 /* Name - mono_arch_get_static_rgctx_trampoline */
614 /* Function - Create a trampoline which sets RGCTX_REG to MRGCTX*/
615 /* then jumps to ADDR. */
617 /*------------------------------------------------------------------*/
620 mono_arch_get_static_rgctx_trampoline (MonoMethod *m,
621 MonoMethodRuntimeGenericContext *mrgctx,
624 guint8 *code, *start;
628 MonoDomain *domain = mono_domain_get ();
632 start = code = mono_domain_code_reserve (domain, buf_len);
634 S390_SET (code, MONO_ARCH_RGCTX_REG, mrgctx);
635 displace = ((uintptr_t) addr - (uintptr_t) code) / 2;
636 s390_jg (code, displace);
637 g_assert ((code - start) < buf_len);
639 mono_arch_flush_icache (start, code - start);
640 mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
645 /*========================= End of Function ========================*/
647 /*------------------------------------------------------------------*/
649 /* Name - handler_block_trampoline_helper */
653 /*------------------------------------------------------------------*/
656 handler_block_trampoline_helper (gpointer *ptr)
658 MonoJitTlsData *jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
659 *ptr = jit_tls->handler_block_return_address;
662 /*========================= End of Function ========================*/
664 /*------------------------------------------------------------------*/
666 /* Name - mono_arch_create_handler_block_trampoline */
670 /*------------------------------------------------------------------*/
673 mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot)
675 guint8 *tramp = mono_get_trampoline_code (MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD);
678 MonoJumpInfo *ji = NULL;
679 GSList *unwind_ops = NULL;
683 code = buf = mono_global_codeman_reserve (tramp_size);
686 * This trampoline restore the call chain of the handler block
687 * then jumps into the code that deals with it.
690 if (mono_get_jit_tls_offset () != -1) {
691 s390_ear (code, s390_r1, 0);
692 s390_sllg (code, s390_r1, s390_r1, 0, 32);
693 s390_ear (code, s390_r1, 1);
694 S390_SET (code, s390_r14, mono_get_jit_tls_offset());
695 s390_lg (code, s390_r14, s390_r1, 0, G_STRUCT_OFFSET(MonoJitTlsData, handler_block_return_address));
699 S390_SET (code, s390_r1, tramp);
700 s390_br (code, s390_r1);
703 * Slow path uses a C helper
705 S390_SET (code, s390_r2, tramp);
706 S390_SET (code, s390_r1, handler_block_trampoline_helper);
707 s390_br (code, s390_r1);
710 mono_arch_flush_icache (buf, code - buf);
711 mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
712 g_assert (code - buf <= tramp_size);
715 *info = mono_tramp_info_create ("handler_block_trampoline", buf, code - buf, ji, unwind_ops);
720 /*========================= End of Function ========================*/
722 /*------------------------------------------------------------------*/
724 /* Name - mono_arch_create_generic_class_init_trampoline */
728 /*------------------------------------------------------------------*/
731 mono_arch_create_generic_class_init_trampoline (MonoTrampInfo **info, gboolean aot)
735 static int byte_offset = -1;
736 static guint8 bitmask;
739 GSList *unwind_ops = NULL;
740 MonoJumpInfo *ji = NULL;
744 code = buf = mono_global_codeman_reserve (tramp_size);
746 unwind_ops = mono_arch_get_cie_program ();
749 mono_marshal_find_bitfield_offset (MonoVTable, initialized, &byte_offset, &bitmask);
751 s390_llgc(code, s390_r0, 0, MONO_ARCH_VTABLE_REG, byte_offset);
752 s390_nill(code, s390_r0, bitmask);
753 s390_bnzr(code, s390_r14);
755 tramp = mono_arch_create_specific_trampoline (NULL, MONO_TRAMPOLINE_GENERIC_CLASS_INIT,
756 mono_get_root_domain (), NULL);
758 /* jump to the actual trampoline */
759 displace = (tramp - code) / 2;
760 s390_jg (code, displace);
762 mono_arch_flush_icache (buf, code - buf);
764 g_assert (code - buf <= tramp_size);
767 *info = mono_tramp_info_create ("generic_class_init_trampoline", buf, code - buf, ji, unwind_ops);
772 /*========================= End of Function ========================*/