-/*========================= End of Function ========================*/
-
-/*------------------------------------------------------------------*/
-/* */
-/* Name - mono_arch_create_class_init_trampoline */
-/* */
-/* Function - Creates a trampoline function to run a type init- */
-/* ializer. If the trampoline is called, it calls */
-/* mono_runtime_class_init with the given vtable, */
-/* then patches the caller code so it does not get */
-/* called any more. */
-/* */
-/* Parameter - vtable - The type to initialize */
-/* */
-/* Returns - A pointer to the newly created code */
-/* */
-/*------------------------------------------------------------------*/
-
-gpointer
-mono_arch_create_class_init_trampoline (MonoVTable *vtable)
-{
- guint8 *code, *buf, *tramp;
-
- tramp = mono_get_trampoline_code (MONO_TRAMPOLINE_CLASS_INIT);
-
- /*-----------------------------------------------------------*/
- /* This is the method-specific part of the trampoline. Its */
- /* purpose is to provide the generic part with the MonoMethod*/
- /* *method pointer. We'll use r11 to keep that value, for */
- /* instance. However, the generic part of the trampoline */
- /* relies on r11 having the same value it had before coming */
- /* here, so we must save it before. */
- /*-----------------------------------------------------------*/
- code = buf = mono_global_codeman_reserve(METHOD_TRAMPOLINE_SIZE);
-
- s390_st (buf, s390_r14, 0, STK_BASE, S390_RET_ADDR_OFFSET);
- s390_ahi (buf, STK_BASE, -S390_MINIMAL_STACK_SIZE);
-
- s390_basr (buf, s390_r1, 0);
- s390_j (buf, 6);
- s390_word (buf, vtable);
- s390_word (buf, s390_class_init_trampoline);
- s390_lr (buf, s390_r3, s390_r14);
- s390_l (buf, s390_r2, 0, s390_r1, 4);
- s390_lhi (buf, s390_r4, 0);
- s390_l (buf, s390_r1, 0, s390_r1, 8);
- s390_basr (buf, s390_r14, s390_r1);
-
- s390_ahi (buf, STK_BASE, S390_MINIMAL_STACK_SIZE);
- s390_l (buf, s390_r14, 0, STK_BASE, S390_RET_ADDR_OFFSET);
- s390_br (buf, s390_r14);
-
- /* Flush instruction cache, since we've generated code */
- mono_arch_flush_icache (code, buf - code);
-