Skip to content

Commit

Permalink
Merge pull request #1301 from Unity-Technologies/valuetype-ref-return…
Browse files Browse the repository at this point in the history
…-x64jit-fix

Valuetype ref return x64jit fix
  • Loading branch information
joncham authored Jun 2, 2020
2 parents c120dcd + c616275 commit 79a0da3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mono/mini/method-to-ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -12458,7 +12458,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
CHECK_OPSIZE (4);
n = read16 (ip + 2);
CHECK_LOCAL (n);
if ((ip [4] == CEE_LDFLD) && ip_in_bb (cfg, cfg->cbb, ip + 4) && header->locals [n]->type == MONO_TYPE_VALUETYPE) {
if ((ip [4] == CEE_LDFLD) && ip_in_bb (cfg, cfg->cbb, ip + 4) && MONO_TYPE_ISSTRUCT (header->locals [n])) {
/* Avoid loading a struct just to load one of its fields */
EMIT_NEW_LOCLOADA (cfg, ins, n);
} else {
Expand Down

0 comments on commit 79a0da3

Please sign in to comment.