Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/mono/mono/mini/intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,10 @@ MONO_RESTORE_WARNING
t = mini_get_underlying_type (t);
if (cfg->gshared && t != ctx->method_inst->type_argv [0] && MONO_TYPE_ISSTRUCT (t) && mono_class_check_context_used (mono_class_from_mono_type_internal (t)))
cfg->prefer_instances = TRUE;
return mini_emit_memory_load (cfg, t, args [0], 0, MONO_INST_UNALIGNED);

int align;
mono_type_size (t, &align);
return mini_emit_memory_load (cfg, t, args [0], 0, ((guintptr)&(args [0]->dreg) % align == 0) ? 0 : MONO_INST_UNALIGNED);
} else if (!strcmp (cmethod->name, "WriteUnaligned")) {
g_assert (ctx);
g_assert (ctx->method_inst);
Expand Down