Skip to content

Commit 4c5add2

Browse files
committed
use a different filter
1 parent 8361978 commit 4c5add2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2207,14 +2207,15 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas
22072207
// back to what is effectively `ReadUnaligned<TTo>(ref As<TFrom, byte>(ref source))`
22082208
// for anything that can't be special cased as potentially zero-cost move.
22092209

2210-
#if false
2210+
int mt = mono_mint_type (tto);
2211+
#if true
22112212
bool tfrom_is_primitive_or_enum = m_class_is_primitive (tfrom_klass) || m_class_is_enumtype (tfrom_klass);
22122213
bool tto_is_primitive_or_enum = m_class_is_primitive (tto_klass) || m_class_is_enumtype (tto_klass);
22132214

22142215
*op = -1;
22152216

22162217
if (tfrom_is_primitive_or_enum && tto_is_primitive_or_enum) {
2217-
*op = interp_get_mov_for_type (mono_mint_type (tto), TRUE);
2218+
*op = interp_get_mov_for_type (mt, TRUE);
22182219
}
22192220

22202221
if (*op == -1) {
@@ -2242,7 +2243,7 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas
22422243
td->sp--;
22432244
interp_add_ins (td, *op);
22442245
interp_ins_set_sreg (td->last_ins, td->sp [-1].var);
2245-
push_type (td, tto, tto_klass);
2246+
push_type (td, stack_type[mt], tto_klass);
22462247
interp_ins_set_dreg (td->last_ins, td->sp [-1].var);
22472248
td->ip += 5;
22482249
}

0 commit comments

Comments
 (0)