diff --git a/src/mono/mono/arch/s390x/tramp.c b/src/mono/mono/arch/s390x/tramp.c index bdb81f041220d..376970c4ab60b 100644 --- a/src/mono/mono/arch/s390x/tramp.c +++ b/src/mono/mono/arch/s390x/tramp.c @@ -131,7 +131,7 @@ calculate_sizes (MonoMethodSignature *sig, size_data *sz, /* area that the callee will use. */ /*----------------------------------------------------------*/ - if (sig->ret->byref || string_ctor) { + if (m_type_is_byref (sig->ret) || string_ctor) { sz->code_size += 8; } else { simpletype = sig->ret->type; @@ -204,7 +204,7 @@ calculate_sizes (MonoMethodSignature *sig, size_data *sz, /*----------------------------------------------------------*/ for (i = 0; i < sig->param_count; ++i) { - if (sig->params [i]->byref) { + if (m_type_is_byref (sig->params [i])) { add_general (&gr, sz, TRUE); continue; } @@ -379,8 +379,8 @@ emit_save_parameters (guint8 *p, MonoMethodSignature *sig, size_data *sz) act_strs = 0; for (i = 0; i < sig->param_count; ++i) { - DEBUG(printf("par: %d type: %d ref: %d\n",i,sig->params[i]->type,sig->params[i]->byref)); - if (sig->params [i]->byref) { + DEBUG(printf("par: %d type: %d ref: %d\n",i,sig->params[i]->type,m_type_is_byref (sig->params[i]))); + if (m_type_is_byref (sig->params [i])) { if (gr < GENERAL_REGS) { s390_lg (p, s390_r2 + gr, 0, ARG_BASE, STKARG); gr ++; @@ -584,7 +584,7 @@ emit_call_and_store_retval (guint8 *p, MonoMethodSignature *sig, s390_basr (p, s390_r14, s390_r9); /* get return value */ - if (sig->ret->byref || string_ctor) { + if (m_type_is_byref (sig->ret) || string_ctor) { s390_stg(p, s390_r2, 0, s390_r8, 0); } else { simpletype = sig->ret->type; @@ -897,7 +897,7 @@ mono_arch_create_method_pointer (MonoMethod *method) for (i = 0; i < sig->param_count; i++) { MonoType *type = sig->params [i]; vtbuf [i] = -1; - DEBUG(printf("par: %d type: %d ref: %d\n",i,type->type,type->byref)); + DEBUG(printf("par: %d type: %d ref: %d\n",i,type->type,m_type_is_byref (type))); if (type->type == MONO_TYPE_VALUETYPE) { MonoClass *klass = type->data.klass; gint size; @@ -927,7 +927,7 @@ mono_arch_create_method_pointer (MonoMethod *method) /* add stackval arguments */ /*----------------------------------------------------------*/ for (i = 0; i < sig->param_count; ++i) { - if (sig->params [i]->byref) { + if (m_type_is_byref (sig->params [i])) { ADD_ISTACK_PARM(0, 1); } else { simple_type = sig->params [i]->type; @@ -1009,7 +1009,7 @@ mono_arch_create_method_pointer (MonoMethod *method) /*----------------------------------------------------------*/ s390_la (p, s390_r10, 0, STK_BASE, stackval_arg_pos); s390_stg(p, s390_r10, 0, STK_BASE, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, retval))); - if (sig->ret->type == MONO_TYPE_VALUETYPE && !sig->ret->byref) { + if (sig->ret->type == MONO_TYPE_VALUETYPE && !m_type_is_byref (sig->ret)) { MonoClass *klass = sig->ret->data.klass; if (!klass->enumtype) { s390_la (p, s390_r9, 0, s390_r10, sizeof(stackval)); @@ -1030,8 +1030,8 @@ mono_arch_create_method_pointer (MonoMethod *method) /*----------------------------------------------------------*/ /* move retval from stackval to proper place (r3/r4/...) */ /*----------------------------------------------------------*/ - DEBUG(printf("retType: %d byRef: %d\n",sig->ret->type,sig->ret->byref)); - if (sig->ret->byref) { + DEBUG(printf("retType: %d byRef: %d\n",sig->ret->type,m_type_is_byref (sig->ret))); + if (m_type_is_byref (sig->ret)) { DEBUG (printf ("ret by ref\n")); s390_stg(p, s390_r2, 0, s390_r10, 0); } else { diff --git a/src/mono/mono/metadata/class.c b/src/mono/mono/metadata/class.c index 9c9ab6be663ef..2a1fd8f1e4d72 100644 --- a/src/mono/mono/metadata/class.c +++ b/src/mono/mono/metadata/class.c @@ -705,7 +705,7 @@ inflate_generic_type (MonoImage *image, MonoType *type, MonoGenericContext *cont /* * Note that the VAR/MVAR cases are different from the rest. The other cases duplicate @type, * while the VAR/MVAR duplicates a type from the context. So, we need to ensure that the - * ->byref and ->attrs from @type are propagated to the returned type. + * ->byref__ and ->attrs from @type are propagated to the returned type. */ nt = mono_metadata_type_dup_with_cmods (image, inst->type_argv [num], type); nt->byref__ = type->byref__; diff --git a/src/mono/mono/metadata/cominterop.c b/src/mono/mono/metadata/cominterop.c index 3659c950ee10c..ddeeaccb73502 100644 --- a/src/mono/mono/metadata/cominterop.c +++ b/src/mono/mono/metadata/cominterop.c @@ -302,7 +302,7 @@ cominterop_method_signature (MonoMethod* method) // last arg is return type if (!MONO_TYPE_IS_VOID (sig->ret)) { res->params[param_count-1] = mono_metadata_type_dup (image, sig->ret); - res->params[param_count-1]->byref = 1; + res->params[param_count-1]->byref__ = 1; res->params[param_count-1]->attrs = PARAM_ATTRIBUTE_OUT; } @@ -1337,17 +1337,17 @@ mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum, mono_mb_emit_stloc (mb, conv_arg); /* we dont need any conversions for out parameters */ - if (t->byref && t->attrs & PARAM_ATTRIBUTE_OUT) + if (m_type_is_byref (t) && t->attrs & PARAM_ATTRIBUTE_OUT) break; mono_mb_emit_ldarg (mb, argnum); - if (t->byref) + if (m_type_is_byref (t)) mono_mb_emit_byte (mb, CEE_LDIND_REF); /* if null just break, conv arg was already inited to 0 */ pos_null = mono_mb_emit_short_branch (mb, CEE_BRFALSE_S); mono_mb_emit_ldarg (mb, argnum); - if (t->byref) + if (m_type_is_byref (t)) mono_mb_emit_byte (mb, CEE_LDIND_REF); if (klass && klass != mono_defaults.object_class) { @@ -1369,7 +1369,7 @@ mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum, } case MARSHAL_ACTION_CONV_OUT: { - if (t->byref && (t->attrs & PARAM_ATTRIBUTE_OUT)) { + if (m_type_is_byref (t) && (t->attrs & PARAM_ATTRIBUTE_OUT)) { int ccw_obj; guint32 pos_null = 0, pos_ccw = 0, pos_end = 0; ccw_obj = mono_mb_add_local (mb, mono_get_object_type ()); @@ -1420,7 +1420,7 @@ mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum, break; } case MARSHAL_ACTION_PUSH: - if (t->byref) + if (m_type_is_byref (t)) mono_mb_emit_ldloc_addr (mb, conv_arg); else mono_mb_emit_ldloc (mb, conv_arg); @@ -1489,12 +1489,12 @@ mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum, break; mono_mb_emit_ldarg (mb, argnum); - if (t->byref) + if (m_type_is_byref (t)) mono_mb_emit_byte (mb, CEE_LDIND_REF); pos_null = mono_mb_emit_short_branch (mb, CEE_BRFALSE_S); mono_mb_emit_ldarg (mb, argnum); - if (t->byref) + if (m_type_is_byref (t)) mono_mb_emit_byte (mb, CEE_LDIND_REF); mono_mb_emit_icon (mb, TRUE); mono_mb_emit_icall (mb, cominterop_get_ccw_object); @@ -1504,7 +1504,7 @@ mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum, mono_mb_emit_ldarg (mb, argnum); - if (t->byref) + if (m_type_is_byref (t)) mono_mb_emit_byte (mb, CEE_LDIND_REF); mono_mb_emit_managed_call (mb, get_object_for_iunknown, NULL); @@ -1527,7 +1527,7 @@ mono_cominterop_emit_marshal_com_interface (EmitMarshalContext *m, int argnum, } case MARSHAL_ACTION_MANAGED_CONV_OUT: { - if (t->byref && t->attrs & PARAM_ATTRIBUTE_OUT) { + if (m_type_is_byref (t) && t->attrs & PARAM_ATTRIBUTE_OUT) { guint32 pos_null = 0; mono_mb_emit_ldarg (mb, argnum); @@ -2557,7 +2557,7 @@ cominterop_get_managed_wrapper_adjusted (MonoMethod *method) /* handler code */ main_clause->handler_offset = mono_mb_get_label (mb); - if (!preserve_sig || (sig->ret && !sig->ret->byref && (sig->ret->type == MONO_TYPE_U4 || sig->ret->type == MONO_TYPE_I4))) { + if (!preserve_sig || (sig->ret && !m_type_is_byref (sig->ret) && (sig->ret->type == MONO_TYPE_U4 || sig->ret->type == MONO_TYPE_I4))) { mono_mb_emit_managed_call (mb, get_hr_for_exception, NULL); mono_mb_emit_stloc (mb, hr); } @@ -3300,7 +3300,7 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT indices_var = mono_mb_add_local (mb, int_type); empty_var = mono_mb_add_local (mb, int_type); - if (t->byref) { + if (m_type_is_byref (t)) { mono_mb_emit_ldarg (mb, argnum); mono_mb_emit_byte (mb, CEE_LDIND_REF); } else @@ -3333,7 +3333,7 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT g_assert (get_value_impl); - if (t->byref) { + if (m_type_is_byref (t)) { mono_mb_emit_ldarg (mb, argnum); mono_mb_emit_byte (mb, CEE_LDIND_REF); } else @@ -3373,7 +3373,7 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT } case MARSHAL_ACTION_PUSH: - if (t->byref) + if (m_type_is_byref (t)) mono_mb_emit_ldloc_addr (mb, conv_arg); else mono_mb_emit_ldloc (mb, conv_arg); @@ -3386,7 +3386,7 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT Array result; // result_var IntPtr indices; // indices_var int empty; // empty_var - bool byValue = !t->byref && (t->attrs & PARAM_ATTRIBUTE_IN); + bool byValue = !m_type_is_byref (t) && (t->attrs & PARAM_ATTRIBUTE_IN); if (mono_marshal_safearray_begin(safearray, out result, out indices, out empty, parameter, byValue)) { if (!empty) { int index=0; // index_var @@ -3407,7 +3407,7 @@ mono_cominterop_emit_marshal_safearray (EmitMarshalContext *m, int argnum, MonoT int result_var, indices_var, empty_var, elem_var, index_var; guint32 label1 = 0, label2 = 0, label3 = 0, label4 = 0; - gboolean byValue = !t->byref && (t->attrs & PARAM_ATTRIBUTE_IN); + gboolean byValue = !m_type_is_byref (t) && (t->attrs & PARAM_ATTRIBUTE_IN); MonoType *object_type = mono_get_object_type (); MonoType *int_type = mono_get_int_type (); diff --git a/src/mono/mono/metadata/object.c b/src/mono/mono/metadata/object.c index 11b61ad44c600..70f77b0495c49 100644 --- a/src/mono/mono/metadata/object.c +++ b/src/mono/mono/metadata/object.c @@ -958,7 +958,7 @@ compute_class_non_ref_bitmap (MonoClass *klass, gsize *bitmap, int size, int off if (field->type->attrs & (FIELD_ATTRIBUTE_STATIC | FIELD_ATTRIBUTE_HAS_FIELD_RVA)) continue; /* FIXME: should not happen, flag as type load error */ - if (field->type->byref) + if (m_type_is_byref (field->type)) break; pos = field->offset / wordsize; diff --git a/src/mono/mono/mini/calls.c b/src/mono/mono/mini/calls.c index a407ecbbea20f..065ce74855d67 100644 --- a/src/mono/mono/mini/calls.c +++ b/src/mono/mono/mini/calls.c @@ -233,7 +233,7 @@ mini_emit_call_args (MonoCompile *cfg, MonoMethodSignature *sig, t = mono_get_int_type (); t = mono_type_get_underlying_type (t); - if (!t->byref && t->type == MONO_TYPE_R4) { + if (!m_type_is_byref (t) && t->type == MONO_TYPE_R4) { MonoInst *iargs [1]; MonoInst *conv; diff --git a/src/mono/mono/mini/ir-emit.h b/src/mono/mono/mini/ir-emit.h index 209e150dc432d..5ab8f38defb61 100644 --- a/src/mono/mono/mini/ir-emit.h +++ b/src/mono/mono/mini/ir-emit.h @@ -502,7 +502,7 @@ handle_gsharedvt_ldaddr (MonoCompile *cfg) */ #define EMIT_NEW_VARLOAD_SFLOAT(cfg,dest,var,vartype) do { \ - if (!COMPILE_LLVM ((cfg)) && !(vartype)->byref && (vartype)->type == MONO_TYPE_R4) { \ + if (!COMPILE_LLVM ((cfg)) && !m_type_is_byref ((vartype)) && (vartype)->type == MONO_TYPE_R4) { \ MonoInst *iargs [1]; \ EMIT_NEW_VARLOADA (cfg, iargs [0], (var), (vartype)); \ (dest) = mono_emit_jit_icall (cfg, mono_fload_r4, iargs); \ @@ -512,7 +512,7 @@ handle_gsharedvt_ldaddr (MonoCompile *cfg) } while (0) #define EMIT_NEW_VARSTORE_SFLOAT(cfg,dest,var,vartype,inst) do { \ - if (COMPILE_SOFT_FLOAT ((cfg)) && !(vartype)->byref && (vartype)->type == MONO_TYPE_R4) { \ + if (COMPILE_SOFT_FLOAT ((cfg)) && !m_type_is_byref ((vartype)) && (vartype)->type == MONO_TYPE_R4) { \ MonoInst *iargs [2]; \ iargs [0] = (inst); \ EMIT_NEW_VARLOADA (cfg, iargs [1], (var), (vartype)); \ diff --git a/src/mono/mono/mini/mini-gc.c b/src/mono/mono/mini/mini-gc.c index 7b2f8a694badc..8e44adf6e81f7 100644 --- a/src/mono/mono/mini/mini-gc.c +++ b/src/mono/mono/mini/mini-gc.c @@ -1698,7 +1698,7 @@ process_variables (MonoCompile *cfg) is_this = TRUE; } - byref = t->byref; + byref = m_type_is_byref (t); if (ins->opcode == OP_REGVAR) { int hreg; @@ -1831,7 +1831,7 @@ process_variables (MonoCompile *cfg) /* Vret addr etc. */ continue; - if (t->byref) { + if (m_type_is_byref (t)) { if (is_arg) { set_slot_everywhere (gcfg, pos, SLOT_PIN); } else { @@ -1865,7 +1865,7 @@ process_variables (MonoCompile *cfg) set_slot_everywhere (gcfg, pos, SLOT_NOREF); if (cfg->verbose_level > 1) printf ("\tnoref%s at %s0x%x(fp) (R%d, slot = %d): %s\n", (is_arg ? " arg" : ""), ins->inst_offset < 0 ? "-" : "", (ins->inst_offset < 0) ? -(int)ins->inst_offset : (int)ins->inst_offset, vmv->vreg, pos, mono_type_full_name (ins->inst_vtype)); - if (!t->byref && sizeof (host_mgreg_t) == 4 && (t->type == MONO_TYPE_I8 || t->type == MONO_TYPE_U8 || t->type == MONO_TYPE_R8)) { + if (!m_type_is_byref (t) && sizeof (host_mgreg_t) == 4 && (t->type == MONO_TYPE_I8 || t->type == MONO_TYPE_U8 || t->type == MONO_TYPE_R8)) { set_slot_everywhere (gcfg, pos + 1, SLOT_NOREF); if (cfg->verbose_level > 1) printf ("\tnoref at %s0x%x(fp) (R%d, slot = %d): %s\n", ins->inst_offset < 0 ? "-" : "", (ins->inst_offset < 0) ? -(int)(ins->inst_offset + 4) : (int)ins->inst_offset + 4, vmv->vreg, pos + 1, mono_type_full_name (ins->inst_vtype)); diff --git a/src/mono/mono/mini/mini-mips.c b/src/mono/mono/mini/mini-mips.c index b77252e751571..666c3cd51f936 100644 --- a/src/mono/mono/mini/mini-mips.c +++ b/src/mono/mono/mini/mini-mips.c @@ -1680,7 +1680,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call) in = call->args [i]; if (ainfo->storage == ArgInIReg) { #if SIZEOF_REGISTER == 4 - if (!t->byref && ((t->type == MONO_TYPE_I8) || (t->type == MONO_TYPE_U8))) { + if (!m_type_is_byref (t) && ((t->type == MONO_TYPE_I8) || (t->type == MONO_TYPE_U8))) { MONO_INST_NEW (cfg, ins, OP_MOVE); ins->dreg = mono_alloc_ireg (cfg); ins->sreg1 = MONO_LVREG_LS (in->dreg); @@ -1694,7 +1694,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call) mono_call_inst_add_outarg_reg (cfg, call, ins->dreg, ainfo->reg + ms_word_idx, FALSE); } else #endif - if (!t->byref && (t->type == MONO_TYPE_R4)) { + if (!m_type_is_byref (t) && (t->type == MONO_TYPE_R4)) { int freg; #if PROMOTE_R4_TO_R8 @@ -1713,7 +1713,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call) ins->sreg1 = freg; MONO_ADD_INS (cfg->cbb, ins); mono_call_inst_add_outarg_reg (cfg, call, ins->dreg, ainfo->reg, FALSE); - } else if (!t->byref && (t->type == MONO_TYPE_R8)) { + } else if (!m_type_is_byref (t) && (t->type == MONO_TYPE_R8)) { /* trying to load float value into int registers */ MONO_INST_NEW (cfg, ins, OP_MIPS_MFC1D); ins->dreg = mono_alloc_ireg (cfg); @@ -1747,9 +1747,9 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call) memcpy (ins->inst_p1, ainfo, sizeof (ArgInfo)); MONO_ADD_INS (cfg->cbb, ins); } else if (ainfo->storage == ArgOnStack) { - if (!t->byref && ((t->type == MONO_TYPE_I8) || (t->type == MONO_TYPE_U8))) { + if (!m_type_is_byref (t) && ((t->type == MONO_TYPE_I8) || (t->type == MONO_TYPE_U8))) { MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREI8_MEMBASE_REG, mips_sp, ainfo->offset, in->dreg); - } else if (!t->byref && ((t->type == MONO_TYPE_R4) || (t->type == MONO_TYPE_R8))) { + } else if (!m_type_is_byref (t) && ((t->type == MONO_TYPE_R4) || (t->type == MONO_TYPE_R8))) { if (t->type == MONO_TYPE_R8) MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORER8_MEMBASE_REG, mips_sp, ainfo->offset, in->dreg); else @@ -1902,7 +1902,7 @@ mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) { MonoType *ret = mini_get_underlying_type (mono_method_signature_internal (method)->ret); - if (!ret->byref) { + if (!m_type_is_byref (ret)) { #if (SIZEOF_REGISTER == 4) if (ret->type == MONO_TYPE_I8 || ret->type == MONO_TYPE_U8) { MonoInst *ins; diff --git a/src/mono/mono/mini/mini-ppc.c b/src/mono/mono/mini/mini-ppc.c index e3de468cbac11..df2cd3b6f362b 100644 --- a/src/mono/mono/mini/mini-ppc.c +++ b/src/mono/mono/mini/mini-ppc.c @@ -627,7 +627,7 @@ mono_arch_cpu_optimizations (guint32 *exclude_mask) static gboolean is_regsize_var (MonoType *t) { - if (t->byref) + if (m_type_is_byref (t)) return TRUE; t = mini_get_underlying_type (t); switch (t->type) { @@ -906,7 +906,7 @@ is_struct_returnable_via_regs (MonoClass *klass, gboolean is_pinvoke) while ((f = mono_class_get_fields_internal (klass, &iter))) { if (!(f->type->attrs & FIELD_ATTRIBUTE_STATIC)) { // TBD: Is there a better way to check for the basic types? - if (f->type->byref) { + if (m_type_is_byref (f->type)) { return FALSE; } else if ((f->type->type >= MONO_TYPE_BOOLEAN) && (f->type->type <= MONO_TYPE_R8)) { has_a_field = TRUE; @@ -982,7 +982,7 @@ has_only_a_r48_field (MonoClass *klass) if (!(f->type->attrs & FIELD_ATTRIBUTE_STATIC)) { if (have_field) return FALSE; - if (!f->type->byref && (f->type->type == MONO_TYPE_R4 || f->type->type == MONO_TYPE_R8)) + if (!m_type_is_byref (f->type) && (f->type->type == MONO_TYPE_R4 || f->type->type == MONO_TYPE_R8)) have_field = TRUE; else return FALSE; @@ -1054,7 +1054,7 @@ get_call_info (MonoMethodSignature *sig) add_general (&gr, &stack_size, &cinfo->sig_cookie, TRUE); } DEBUG(printf("param %d: ", i)); - if (sig->params [i]->byref) { + if (m_type_is_byref (sig->params [i])) { DEBUG(printf("byref\n")); add_general (&gr, &stack_size, cinfo->args + n, TRUE); n++; @@ -1598,7 +1598,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call) if (ainfo->regtype == RegTypeGeneral) { #ifndef __mono_ppc64__ - if (!t->byref && ((t->type == MONO_TYPE_I8) || (t->type == MONO_TYPE_U8))) { + if (!m_type_is_byref (t) && ((t->type == MONO_TYPE_I8) || (t->type == MONO_TYPE_U8))) { MONO_INST_NEW (cfg, ins, OP_MOVE); ins->dreg = mono_alloc_ireg (cfg); ins->sreg1 = MONO_LVREG_LS (in->dreg); @@ -1651,9 +1651,9 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call) MONO_ADD_INS (cfg->cbb, ins); cfg->flags |= MONO_CFG_HAS_FPOUT; } else if (ainfo->regtype == RegTypeBase) { - if (!t->byref && ((t->type == MONO_TYPE_I8) || (t->type == MONO_TYPE_U8))) { + if (!m_type_is_byref (t) && ((t->type == MONO_TYPE_I8) || (t->type == MONO_TYPE_U8))) { MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREI8_MEMBASE_REG, ppc_r1, ainfo->offset, in->dreg); - } else if (!t->byref && ((t->type == MONO_TYPE_R4) || (t->type == MONO_TYPE_R8))) { + } else if (!m_type_is_byref (t) && ((t->type == MONO_TYPE_R4) || (t->type == MONO_TYPE_R8))) { if (t->type == MONO_TYPE_R8) MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORER8_MEMBASE_REG, ppc_r1, ainfo->offset, in->dreg); else @@ -1824,7 +1824,7 @@ void mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) { MonoType *ret = mini_get_underlying_type (mono_method_signature_internal (method)->ret); - if (!ret->byref) { + if (!rm_type_is_byref (ret)) { #ifndef __mono_ppc64__ if (ret->type == MONO_TYPE_I8 || ret->type == MONO_TYPE_U8) { MonoInst *ins; diff --git a/src/mono/mono/mini/mini-s390x.c b/src/mono/mono/mini/mini-s390x.c index 5ad3edbef2c4a..b77fc97a11387 100644 --- a/src/mono/mono/mini/mini-s390x.c +++ b/src/mono/mono/mini/mini-s390x.c @@ -1219,7 +1219,7 @@ get_call_info (MonoMemPool *mp, MonoMethodSignature *sig) add_general (&gr, sz, &cinfo->sigCookie); } - if (sig->params [i]->byref) { + if (m_type_is_byref (sig->params [i])) { add_general (&gr, sz, cinfo->args+nParm); cinfo->args[nParm].size = sizeof(gpointer); nParm++; @@ -1869,11 +1869,11 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call) break; } case RegTypeBase : - if (!t->byref && t->type == MONO_TYPE_R4) { + if (!m_type_is_byref (t) && t->type == MONO_TYPE_R4) { MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORER4_MEMBASE_REG, STK_BASE, ainfo->offset + 4, in->dreg); - } else if (!t->byref && (t->type == MONO_TYPE_R8)) { + } else if (!m_type_is_byref (t) && (t->type == MONO_TYPE_R8)) { MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORER8_MEMBASE_REG, STK_BASE, ainfo->offset, in->dreg); @@ -2000,7 +2000,7 @@ mono_arch_emit_setret (MonoCompile *cfg, MonoMethod *method, MonoInst *val) { MonoType *ret = mini_get_underlying_type (mono_method_signature_internal (method)->ret); - if (!ret->byref) { + if (!m_type_is_byref (ret)) { if (ret->type == MONO_TYPE_R4) { MONO_EMIT_NEW_UNALU (cfg, OP_S390_SETF4RET, s390_f0, val->dreg); return; diff --git a/src/mono/mono/mini/mini-sparc.c b/src/mono/mono/mini/mini-sparc.c index 448f150c5505b..184477cfc5175 100644 --- a/src/mono/mono/mini/mini-sparc.c +++ b/src/mono/mono/mini/mini-sparc.c @@ -513,7 +513,7 @@ get_call_info (MonoCompile *cfg, MonoMethodSignature *sig, gboolean is_pinvoke) } DEBUG(printf("param %d: ", i)); - if (sig->params [i]->byref) { + if (m_type_is_byref (sig->params [i])) { DEBUG(printf("byref\n")); add_general (&gr, &stack_size, ainfo, FALSE); @@ -905,7 +905,7 @@ mono_arch_allocate_vars (MonoCompile *cfg) arg_type = sig->params [i - sig->hasthis]; #ifndef SPARCV9 - if (!arg_type->byref && ((arg_type->type == MONO_TYPE_R4) + if (!m_type_is_byref (arg_type) && ((arg_type->type == MONO_TYPE_R4) || (arg_type->type == MONO_TYPE_R8))) /* * Since float arguments are passed in integer registers, we need to @@ -964,7 +964,7 @@ mono_arch_allocate_vars (MonoCompile *cfg) inst->inst_basereg = sparc_fp; inst->inst_offset = ainfo->offset + ARGS_OFFSET; - if (!arg_type->byref && (arg_type->type == MONO_TYPE_R8)) { + if (!m_type_is_byref (arg_type) && (arg_type->type == MONO_TYPE_R8)) { /* * It is very hard to load doubles from non-doubleword aligned * memory locations. So if the offset is misaligned, we copy the @@ -1025,7 +1025,7 @@ mono_arch_create_vars (MonoCompile *cfg) } } - if (!sig->ret->byref && (sig->ret->type == MONO_TYPE_I8 || sig->ret->type == MONO_TYPE_U8)) { + if (!m_type_is_byref (sig->ret) && (sig->ret->type == MONO_TYPE_I8 || sig->ret->type == MONO_TYPE_U8)) { MonoInst *low = get_vreg_to_inst (cfg, MONO_LVREG_LS (cfg->ret->dreg)); MonoInst *high = get_vreg_to_inst (cfg, MONO_LVREG_MS (cfg->ret->dreg)); @@ -1298,11 +1298,11 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call) arg_type = mini_get_underlying_type (arg_type); if ((i >= sig->hasthis) && (MONO_TYPE_ISSTRUCT(sig->params [i - sig->hasthis]))) emit_pass_vtype (cfg, call, cinfo, ainfo, arg_type, in, sig->pinvoke); - else if (!arg_type->byref && ((arg_type->type == MONO_TYPE_I8) || (arg_type->type == MONO_TYPE_U8))) + else if (!m_type_is_byref (arg_type) && ((arg_type->type == MONO_TYPE_I8) || (arg_type->type == MONO_TYPE_U8))) emit_pass_long (cfg, call, ainfo, in); - else if (!arg_type->byref && (arg_type->type == MONO_TYPE_R8)) + else if (!m_type_is_byref (arg_type) && (arg_type->type == MONO_TYPE_R8)) emit_pass_double (cfg, call, ainfo, in); - else if (!arg_type->byref && (arg_type->type == MONO_TYPE_R4)) + else if (!m_type_is_byref (arg_type) && (arg_type->type == MONO_TYPE_R4)) emit_pass_float (cfg, call, ainfo, in); else emit_pass_other (cfg, call, ainfo, arg_type, in); @@ -2133,7 +2133,7 @@ emit_load_volatile_arguments (MonoCompile *cfg, guint32 *code) sparc_st_imm (code, inst->inst_basereg, stack_offset, sparc_i5); } - if (!v64 && !arg_type->byref && (arg_type->type == MONO_TYPE_R8)) { + if (!v64 && !m_type_is_byref (arg_type) && (arg_type->type == MONO_TYPE_R8)) { if (ainfo->storage == ArgInIRegPair) { if (!sparc_is_imm13 (inst->inst_offset + 4)) NOT_IMPLEMENTED; @@ -3946,7 +3946,7 @@ mono_arch_emit_prolog (MonoCompile *cfg) sparc_st_imm (code, sparc_i5, inst->inst_basereg, stack_offset); } - if (!v64 && !arg_type->byref && (arg_type->type == MONO_TYPE_R8)) { + if (!v64 && !m_type_is_byref (arg_type) && (arg_type->type == MONO_TYPE_R8)) { /* Save the argument to a dword aligned stack location */ /* * stack_offset contains the offset of the argument on the stack.