Skip to content

Commit 7780564

Browse files
committed
Try a slightly different approach
1 parent 2be0b31 commit 7780564

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/mono/mono/mini/interp/transform.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2177,14 +2177,7 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas
21772177
// instead we fallback to the managed implementation which will do the right things
21782178

21792179
MonoType *tfrom = ctx->method_inst->type_argv [0];
2180-
if (mini_is_gsharedvt_variable_type (tfrom)) {
2181-
return FALSE;
2182-
}
2183-
21842180
MonoType *tto = ctx->method_inst->type_argv [1];
2185-
if (mini_is_gsharedvt_variable_type (tto)) {
2186-
return FALSE;
2187-
}
21882181

21892182
// The underlying API always throws for reference type inputs, so we
21902183
// fallback to the managed implementation to let that handling occur
@@ -2230,6 +2223,17 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas
22302223
}
22312224

22322225
if (*op == -1) {
2226+
2227+
if (size <= 4) {
2228+
*op = MINT_MOV_4;
2229+
} else if (size <= 8) {
2230+
*op = MINT_MOV_8;
2231+
} else {
2232+
*op = MINT_MOV_VT;
2233+
}
2234+
}
2235+
2236+
if (*op == MINT_MOV_VT) {
22332237
td->sp--;
22342238
interp_add_ins (td, MINT_MOV_VT);
22352239
interp_ins_set_sreg (td->last_ins, td->sp [0].var);

0 commit comments

Comments
 (0)