Skip to content

Commit

Permalink
Fix the add intrinsic
Browse files Browse the repository at this point in the history
  • Loading branch information
kg committed Jun 10, 2024
1 parent f829d7c commit 71cf842
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/mono/mono/mini/interp/transform.c
Original file line number Diff line number Diff line change
Expand Up @@ -2264,7 +2264,7 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas
#else
*op = MINT_LDC_I8_0;
#endif
} /* else if (!strcmp (tm, "Add")) {
} else if (!strcmp (tm, "Add")) {
MonoGenericContext *ctx = mono_method_get_context (target_method);
g_assert (ctx);
g_assert (ctx->method_inst);
Expand All @@ -2286,17 +2286,17 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas
td->last_ins->data[0] = (gint16)esize;
interp_ins_set_sreg (td->last_ins, offset_var);
interp_ins_set_dreg (td->last_ins, temp);
td->ip += 4;

// (ldarg 0) add temp
interp_add_ins (td, MINT_ADD_P);
interp_ins_set_sregs2 (td->last_ins, base_var, temp);
push_simple_type (td, STACK_TYPE_MP);
interp_ins_set_dreg (td->last_ins, td->sp [-1].var);
td->ip += 4;

td->ip += 5;

return TRUE;
} */
}
} else if (in_corlib && !strcmp (klass_name_space, "System.Runtime.CompilerServices") && !strcmp (klass_name, "RuntimeHelpers")) {
if (!strcmp (tm, "get_OffsetToStringData")) {
g_assert (csignature->param_count == 0);
Expand Down

0 comments on commit 71cf842

Please sign in to comment.