Remove the MonoGenericContext/MonoMethod arguments from the get_this_arg () and get_u...
[mono.git] / mono / mini / tramp-s390.c
index c71dd61108f60d11840214675861cc888bbecfe2..284e419751839252880a9870107a6cd37ecccf6c 100644 (file)
 /*                When value type methods are called through the    */
 /*               vtable we need to unbox the 'this' argument.      */
 /*                                                                 */
-/* Parameters   - gsctx  - Generic sharing context                 */
-/*                method - Methd pointer                           */
+/* Parameters   - method - Methd pointer                           */
 /*               addr   - Pointer to native code for method        */
 /*                                                                 */
 /*------------------------------------------------------------------*/
 
 gpointer
-mono_arch_get_unbox_trampoline (MonoGenericSharingContext *gsctx, MonoMethod *method, gpointer addr)
+mono_arch_get_unbox_trampoline (MonoMethod *method, gpointer addr)
 {
        guint8 *code, *start;
        int this_pos = s390_r2;
@@ -143,7 +142,7 @@ mono_arch_patch_callsite (guint8 *method_start, guint8 *orig_code, guint8 *addr)
 /*========================= End of Function ========================*/
 
 void
-mono_arch_patch_plt_entry (guint8 *code, guint8 *addr)
+mono_arch_patch_plt_entry (guint8 *code, gpointer *got, mgreg_t *regs, guint8 *addr)
 {
        g_assert_not_reached ();
 }
@@ -159,7 +158,7 @@ mono_arch_patch_plt_entry (guint8 *code, guint8 *addr)
 /*------------------------------------------------------------------*/
 
 void
-mono_arch_nullify_class_init_trampoline (guint8 *code, gssize *regs)
+mono_arch_nullify_class_init_trampoline (guint8 *code, mgreg_t *regs)
 {
        char patch[6] = {0x47, 0x00, 0x00, 0x00, 0x07, 0x00};
 
@@ -171,7 +170,7 @@ mono_arch_nullify_class_init_trampoline (guint8 *code, gssize *regs)
 /*========================= End of Function ========================*/
 
 void
-mono_arch_nullify_plt_entry (guint8 *code)
+mono_arch_nullify_plt_entry (guint8 *code, mgreg_t *regs)
 {
        g_assert_not_reached ();
 }
@@ -199,7 +198,7 @@ mono_arch_nullify_plt_entry (guint8 *code)
 /*------------------------------------------------------------------*/
 
 gpointer
-mono_arch_get_vcall_slot (guint8 *code, gpointer *regs, int *displacement)
+mono_arch_get_vcall_slot (guint8 *code, mgreg_t *regs, int *displacement)
 {
        int reg;
        guchar* base;
@@ -253,19 +252,6 @@ mono_arch_get_vcall_slot (guint8 *code, gpointer *regs, int *displacement)
 
 /*========================= End of Function ========================*/
 
-gpointer*
-mono_arch_get_vcall_slot_addr (guint8* code, gpointer *regs)
-{
-       gpointer vt;
-       int displacement;
-       vt = mono_arch_get_vcall_slot (code, regs, &displacement);
-       if (!vt)
-               return NULL;
-       return (gpointer*)((char*)vt + displacement);
-}
-
-/*========================= End of Function ========================*/
-
 /*------------------------------------------------------------------*/
 /*                                                                  */
 /* Name                - mono_arch_create_trampoline_code                      */
@@ -276,12 +262,15 @@ mono_arch_get_vcall_slot_addr (guint8* code, gpointer *regs)
 /*------------------------------------------------------------------*/
 
 guchar*
-mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
+mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInfo **info, gboolean aot)
 {
-
        guint8 *buf, *tramp, *code;
        int i, offset, lmfOffset;
 
+       g_assert (!aot);
+       if (info)
+               *info = NULL;
+
        /* Now we'll create in 'buf' the S/390 trampoline code. This
           is the trampoline code common to all methods  */
                
@@ -390,7 +379,7 @@ mono_arch_create_trampoline_code (MonoTrampolineType tramp_type)
                                
        /* Set arguments */
 
-       /* Arg 1: gssize *regs. We pass sp instead */
+       /* Arg 1: mgreg_t *regs. We pass sp instead */
        s390_lr   (buf, s390_r2, STK_BASE);
        s390_ahi  (buf, s390_r2, CREATE_STACK_SIZE);
                
@@ -512,7 +501,7 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty
 /*========================= End of Function ========================*/
 
 gpointer
-mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 encoded_offset)
+mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info, gboolean aot)
 {
        /* FIXME: implement! */
        g_assert_not_reached ();