Skip to content

Commit 71cf842

Browse files
committed
Fix the add intrinsic
1 parent f829d7c commit 71cf842

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2264,7 +2264,7 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas
22642264
#else
22652265
*op = MINT_LDC_I8_0;
22662266
#endif
2267-
} /* else if (!strcmp (tm, "Add")) {
2267+
} else if (!strcmp (tm, "Add")) {
22682268
MonoGenericContext *ctx = mono_method_get_context (target_method);
22692269
g_assert (ctx);
22702270
g_assert (ctx->method_inst);
@@ -2286,17 +2286,17 @@ interp_handle_intrinsics (TransformData *td, MonoMethod *target_method, MonoClas
22862286
td->last_ins->data[0] = (gint16)esize;
22872287
interp_ins_set_sreg (td->last_ins, offset_var);
22882288
interp_ins_set_dreg (td->last_ins, temp);
2289-
td->ip += 4;
22902289

22912290
// (ldarg 0) add temp
22922291
interp_add_ins (td, MINT_ADD_P);
22932292
interp_ins_set_sregs2 (td->last_ins, base_var, temp);
22942293
push_simple_type (td, STACK_TYPE_MP);
22952294
interp_ins_set_dreg (td->last_ins, td->sp [-1].var);
2296-
td->ip += 4;
2295+
2296+
td->ip += 5;
22972297

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

0 commit comments

Comments
 (0)