Skip to content

Commit

Permalink
[mono] Fix more usages of MonoType:byref (#60551)
Browse files Browse the repository at this point in the history
Those were missed in #60313 and caused a build break on s390x.
I fixed all other occurences I could find too.
  • Loading branch information
akoeplinger committed Oct 18, 2021
1 parent 66d2600 commit efa6163
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 61 deletions.
20 changes: 10 additions & 10 deletions src/mono/mono/arch/s390x/tramp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 ++;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/class.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__;
Expand Down
32 changes: 16 additions & 16 deletions src/mono/mono/metadata/cominterop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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) {
Expand All @@ -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 ());
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);

Expand All @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand All @@ -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
Expand All @@ -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 ();
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/calls.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/mono/mono/mini/ir-emit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand All @@ -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)); \
Expand Down
6 changes: 3 additions & 3 deletions src/mono/mono/mini/mini-gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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));
Expand Down
12 changes: 6 additions & 6 deletions src/mono/mono/mini/mini-mips.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand All @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
16 changes: 8 additions & 8 deletions src/mono/mono/mini/mini-ppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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++;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit efa6163

Please sign in to comment.