From 5d9084b1b1f955ee70d4fcd02e62653c332deca7 Mon Sep 17 00:00:00 2001 From: Vlad Brezae Date: Tue, 3 Sep 2019 19:36:21 +0300 Subject: [PATCH] [interp] Transform ldloc/stloc pairs to a movloc instruction (mono/mono#16546) * [interp] Add stack information for each instruction For each instruction PopN indicates how many values from the top of the stack are used by the instruction. PushN signals how many values are pushed back. These are also used to prevent values from the stack being optimized out, since they might still be used by an instruction. VarPop and VarPush mean that the number is not constant, so we need to inspect the data fields of the instruction (typically for an imethod or csignature) to figure out the stack usage. * [interp] Convert ldloc/stloc pairs to movloc The movloc instruction operates directly on locals. This is faster due to avoiding dispatch and stack indirection. More important is that it makes it easy to do copy propagation of locals and it has no stack usage, which means that it could even be killed if the destination local is no longer referenced (as well as STLOC_NP). In the future we could reuse this mechanism of tracking the value of a stack slot to do constant propagation and kill even more instructions (we might need to have _IMM versions of opcodes for this to work). * [interp] Enable disabling of interp optimization * [interp] Add time tracking stat for cprop optimizations * [interp] Move stloc.np transformations to the cprop pass It makes more sense to do such transformations here and we also don't want transformations in the generate phase prevent us from detecting alternative transformations when running the full pass. * [interp] Add counter for instructions that were optimized away * [interp] Make it explicit that we are dealing with IR code It can be confusing in verbose output. Commit migrated from https://github.com/mono/mono/commit/930a5d7d440a735b8b50e57ed397a700e3ee27b5 --- src/mono/mono/mini/interp/interp-internals.h | 6 +- src/mono/mono/mini/interp/interp.c | 39 +- src/mono/mono/mini/interp/mintops.c | 43 +- src/mono/mono/mini/interp/mintops.def | 1406 +++++++++++++------------- src/mono/mono/mini/interp/mintops.h | 13 +- src/mono/mono/mini/interp/transform.c | 257 ++++- 6 files changed, 1027 insertions(+), 737 deletions(-) diff --git a/src/mono/mono/mini/interp/interp-internals.h b/src/mono/mono/mini/interp/interp-internals.h index f359f1c..c4f666a 100644 --- a/src/mono/mono/mini/interp/interp-internals.h +++ b/src/mono/mono/mini/interp/interp-internals.h @@ -39,7 +39,9 @@ enum { }; enum { - INTERP_OPT_INLINE = 1 + INTERP_OPT_INLINE = 1, + INTERP_OPT_CPROP = 2, + INTERP_OPT_DEFAULT = INTERP_OPT_INLINE | INTERP_OPT_CPROP }; #if SIZEOF_VOID_P == 4 @@ -161,6 +163,8 @@ typedef struct { typedef struct { gint64 transform_time; + gint64 cprop_time; + gint32 killed_instructions; gint32 inlined_methods; gint32 inline_failures; } MonoInterpStats; diff --git a/src/mono/mono/mini/interp/interp.c b/src/mono/mono/mini/interp/interp.c index be74296..c953b2f 100644 --- a/src/mono/mono/mini/interp/interp.c +++ b/src/mono/mono/mini/interp/interp.c @@ -117,7 +117,7 @@ init_frame (InterpFrame *frame, InterpFrame *parent_frame, InterpMethod *rmethod */ GSList *mono_interp_jit_classes; /* Optimizations enabled with interpreter */ -int mono_interp_opt = INTERP_OPT_INLINE; +int mono_interp_opt = INTERP_OPT_DEFAULT; /* If TRUE, interpreted code will be interrupted at function entry/backward branches */ static gboolean ss_enabled; @@ -3269,7 +3269,7 @@ interp_exec_method_full (InterpFrame *frame, ThreadContext *context, FrameClause unsigned char *locals = NULL; #if USE_COMPUTED_GOTO static void * const in_labels[] = { -#define OPDEF(a,b,c,d) &&LAB_ ## a, +#define OPDEF(a,b,c,d,e,f) &&LAB_ ## a, #include "mintops.def" }; #endif @@ -4844,10 +4844,8 @@ main_loop: MINT_IN_BREAK; } MINT_IN_CASE(MINT_INTRINS_RUNTIMEHELPERS_OBJECT_HAS_COMPONENT_SIZE) { - sp -= 1; - MonoObject *obj = sp [0].data.o; - sp [0].data.i = (obj->vtable->flags & MONO_VT_FLAG_ARRAY_OR_STRING) != 0; - sp ++; + MonoObject *obj = sp [-1].data.o; + sp [-1].data.i = (obj->vtable->flags & MONO_VT_FLAG_ARRAY_OR_STRING) != 0; ++ip; MINT_IN_BREAK; } @@ -6022,12 +6020,6 @@ main_loop: ip += 2; sp++; MINT_IN_BREAK; - MINT_IN_CASE(MINT_MONO_FREE) - ++ip; - --sp; - g_error ("that doesn't seem right"); - g_free (sp->data.p); - MINT_IN_BREAK; MINT_IN_CASE(MINT_MONO_RETOBJ) ++ip; sp--; @@ -6440,6 +6432,23 @@ main_loop: ip += 4; MINT_IN_BREAK; } + +#define MOVLOC(argtype) \ + * (argtype *)(locals + * (guint16 *)(ip + 2)) = * (argtype *)(locals + * (guint16 *)(ip + 1)); \ + ip += 3; + + MINT_IN_CASE(MINT_MOVLOC_1) MOVLOC(guint8); MINT_IN_BREAK; + MINT_IN_CASE(MINT_MOVLOC_2) MOVLOC(guint16); MINT_IN_BREAK; + MINT_IN_CASE(MINT_MOVLOC_4) MOVLOC(guint32); MINT_IN_BREAK; + MINT_IN_CASE(MINT_MOVLOC_8) MOVLOC(guint64); MINT_IN_BREAK; + + MINT_IN_CASE(MINT_MOVLOC_VT) { + int const i32 = READ32(ip + 3); + memcpy (locals + * (guint16 *)(ip + 2), locals + * (guint16*)(ip + 1), i32); + ip += 5; + MINT_IN_BREAK; + } + MINT_IN_CASE(MINT_LOCALLOC) { if (sp != frame->stack + 1) /*FIX?*/ goto abort_label; @@ -6684,10 +6693,12 @@ interp_parse_options (const char *options) if (strncmp (arg, "jit=", 4) == 0) mono_interp_jit_classes = g_slist_prepend (mono_interp_jit_classes, arg + 4); - if (strncmp (arg, "interp-only=", 4) == 0) + if (strncmp (arg, "interp-only=", strlen ("interp-only=")) == 0) mono_interp_only_classes = g_slist_prepend (mono_interp_only_classes, arg + strlen ("interp-only=")); if (strncmp (arg, "-inline", 7) == 0) mono_interp_opt &= ~INTERP_OPT_INLINE; + if (strncmp (arg, "-cprop", 6) == 0) + mono_interp_opt &= ~INTERP_OPT_CPROP; } } @@ -6971,6 +6982,8 @@ register_interp_stats (void) { mono_counters_init (); mono_counters_register ("Total transform time", MONO_COUNTER_INTERP | MONO_COUNTER_LONG | MONO_COUNTER_TIME, &mono_interp_stats.transform_time); + mono_counters_register ("Total cprop time", MONO_COUNTER_INTERP | MONO_COUNTER_LONG | MONO_COUNTER_TIME, &mono_interp_stats.cprop_time); + mono_counters_register ("Instructions optimized away", MONO_COUNTER_INTERP | MONO_COUNTER_INT, &mono_interp_stats.killed_instructions); mono_counters_register ("Methods inlined", MONO_COUNTER_INTERP | MONO_COUNTER_INT, &mono_interp_stats.inlined_methods); mono_counters_register ("Inline failures", MONO_COUNTER_INTERP | MONO_COUNTER_INT, &mono_interp_stats.inline_failures); } diff --git a/src/mono/mono/mini/interp/mintops.c b/src/mono/mono/mini/interp/mintops.c index 1a3f9d6..1fd372e 100644 --- a/src/mono/mono/mini/interp/mintops.c +++ b/src/mono/mono/mini/interp/mintops.c @@ -12,31 +12,56 @@ // This, instead of an array of pointers, to optimize away a pointer and a relocation per string. struct MonoInterpOpnameCharacters { -#define OPDEF(a, b, c, d) char a [sizeof (b)]; +#define OPDEF(a,b,c,d,e,f) char a [sizeof (b)]; #include "mintops.def" }; #undef OPDEF extern const MonoInterpOpnameCharacters mono_interp_opname_characters = { -#define OPDEF(a, b, c, d) b, +#define OPDEF(a,b,c,d,e,f) b, #include "mintops.def" }; #undef OPDEF extern const guint16 mono_interp_opname_offsets [] = { -#define OPDEF(a, b, c, d) offsetof (MonoInterpOpnameCharacters, a), +#define OPDEF(a,b,c,d,e,f) offsetof (MonoInterpOpnameCharacters, a), #include "mintops.def" #undef OPDEF }; -#define OPDEF(a, b, c, d) c, +#define OPDEF(a,b,c,d,e,f) c, unsigned char const mono_interp_oplen [] = { #include "mintops.def" }; #undef OPDEF +#define Push0 0 +#define Push1 1 +#define Push2 2 +#define Pop0 0 +#define Pop1 1 +#define Pop2 2 +#define Pop3 3 +#define Pop4 4 +#define Pop5 5 +#define Pop6 6 +#define PopAll MINT_POP_ALL +#define VarPush MINT_VAR_PUSH +#define VarPop MINT_VAR_POP -#define OPDEF(a, b, c, d) d, +#define OPDEF(a,b,c,d,e,f) d, +int const mono_interp_oppop[] = { +#include "mintops.def" +}; +#undef OPDEF + +#define OPDEF(a,b,c,d,e,f) e, +int const mono_interp_oppush[] = { +#include "mintops.def" +}; +#undef OPDEF + +#define OPDEF(a,b,c,d,e,f) f, MintOpArgType const mono_interp_opargtype [] = { #include "mintops.def" }; @@ -65,7 +90,7 @@ mono_interp_dis_mintop(const guint16 *base, const guint16 *ip) guint32 token; int target; - g_string_append_printf (str, "IL_%04x: %-10s", (int)(ip - base), mono_interp_opname (*ip)); + g_string_append_printf (str, "IR_%04x: %-10s", (int)(ip - base), mono_interp_opname (*ip)); switch (mono_interp_opargtype [*ip]) { case MintOpNoArgs: break; @@ -105,11 +130,11 @@ mono_interp_dis_mintop(const guint16 *base, const guint16 *ip) } case MintOpShortBranch: target = ip + * (short *)(ip + 1) - base; - g_string_append_printf (str, " IL_%04x", target); + g_string_append_printf (str, " IR_%04x", target); break; case MintOpBranch: target = ip + (gint32)READ32 (ip + 1) - base; - g_string_append_printf (str, " IL_%04x", target); + g_string_append_printf (str, " IR_%04x", target); break; case MintOpSwitch: { const guint16 *p = ip + 1; @@ -122,7 +147,7 @@ mono_interp_dis_mintop(const guint16 *base, const guint16 *ip) if (i > 0) g_string_append_printf (str, ", "); offset = (gint32)READ32 (p); - g_string_append_printf (str, "IL_%04x", (int)(p + offset - base)); + g_string_append_printf (str, "IR_%04x", (int)(p + offset - base)); p += 2; } g_string_append_printf (str, ")"); diff --git a/src/mono/mono/mini/interp/mintops.def b/src/mono/mono/mini/interp/mintops.def index ae6c143..2a4cac2 100644 --- a/src/mono/mono/mini/interp/mintops.def +++ b/src/mono/mono/mini/interp/mintops.def @@ -6,716 +6,722 @@ * */ -/* OPDEF (opsymbol, opstring, oplength (in uint16s), optype) */ - -OPDEF(MINT_NOP, "nop", 0, MintOpNoArgs) -OPDEF(MINT_NIY, "niy", 1, MintOpNoArgs) -OPDEF(MINT_BREAK, "break", 1, MintOpNoArgs) -OPDEF(MINT_BREAKPOINT, "breakpoint", 1, MintOpNoArgs) -OPDEF(MINT_LDNULL, "ldnull", 1, MintOpNoArgs) -OPDEF(MINT_DUP, "dup", 1, MintOpNoArgs) -OPDEF(MINT_DUP_VT, "dup.vt", 3, MintOpInt) -OPDEF(MINT_POP, "pop", 2, MintOpShortInt) - -OPDEF(MINT_RET, "ret", 1, MintOpNoArgs) -OPDEF(MINT_RET_VOID, "ret.void", 1, MintOpNoArgs) -OPDEF(MINT_RET_VT, "ret.vt", 3, MintOpInt) - -OPDEF(MINT_VTRESULT, "vtresult", 4, MintOpShortAndInt) /*FIX should be unsigned*/ - -OPDEF(MINT_LDC_I4_M1, "ldc.i4.m1", 1, MintOpNoArgs) -OPDEF(MINT_LDC_I4_0, "ldc.i4.0", 1, MintOpNoArgs) -OPDEF(MINT_LDC_I4_1, "ldc.i4.1", 1, MintOpNoArgs) -OPDEF(MINT_LDC_I4_2, "ldc.i4.2", 1, MintOpNoArgs) -OPDEF(MINT_LDC_I4_3, "ldc.i4.3", 1, MintOpNoArgs) -OPDEF(MINT_LDC_I4_4, "ldc.i4.4", 1, MintOpNoArgs) -OPDEF(MINT_LDC_I4_5, "ldc.i4.5", 1, MintOpNoArgs) -OPDEF(MINT_LDC_I4_6, "ldc.i4.6", 1, MintOpNoArgs) -OPDEF(MINT_LDC_I4_7, "ldc.i4.7", 1, MintOpNoArgs) -OPDEF(MINT_LDC_I4_8, "ldc.i4.8", 1, MintOpNoArgs) - -OPDEF(MINT_LDC_I4_S, "ldc.i4.s", 2, MintOpShortInt) -OPDEF(MINT_LDC_I4, "ldc.i4", 3, MintOpInt) -OPDEF(MINT_LDC_I8, "ldc.i8", 5, MintOpLongInt) -OPDEF(MINT_LDC_I8_S, "ldc.i8.s", 2, MintOpShortInt) - -OPDEF(MINT_LDC_R4, "ldc.r4", 3, MintOpFloat) -OPDEF(MINT_LDC_R8, "ldc.r8", 5, MintOpDouble) - -OPDEF(MINT_ARGLIST, "arglist", 1, MintOpNoArgs) - -OPDEF(MINT_LDARG_I1, "ldarg.i1", 2, MintOpUShortInt) -OPDEF(MINT_LDARG_U1, "ldarg.u1", 2, MintOpUShortInt) -OPDEF(MINT_LDARG_I2, "ldarg.i2", 2, MintOpUShortInt) -OPDEF(MINT_LDARG_U2, "ldarg.u2", 2, MintOpUShortInt) -OPDEF(MINT_LDARG_I4, "ldarg.i4", 2, MintOpUShortInt) -OPDEF(MINT_LDARG_I8, "ldarg.i8", 2, MintOpUShortInt) -OPDEF(MINT_LDARG_R4, "ldarg.r4", 2, MintOpUShortInt) -OPDEF(MINT_LDARG_R8, "ldarg.r8", 2, MintOpUShortInt) -OPDEF(MINT_LDARG_O, "ldarg.o", 2, MintOpUShortInt) -OPDEF(MINT_LDARG_P, "ldarg.p", 2, MintOpUShortInt) -OPDEF(MINT_LDARG_VT, "ldarg.vt", 4, MintOpShortAndInt) - -OPDEF(MINT_STARG_I1, "starg.i1", 2, MintOpUShortInt) -OPDEF(MINT_STARG_U1, "starg.u1", 2, MintOpUShortInt) -OPDEF(MINT_STARG_I2, "starg.i2", 2, MintOpUShortInt) -OPDEF(MINT_STARG_U2, "starg.u2", 2, MintOpUShortInt) -OPDEF(MINT_STARG_I4, "starg.i4", 2, MintOpUShortInt) -OPDEF(MINT_STARG_I8, "starg.i8", 2, MintOpUShortInt) -OPDEF(MINT_STARG_R4, "starg.r4", 2, MintOpUShortInt) -OPDEF(MINT_STARG_R8, "starg.r8", 2, MintOpUShortInt) -OPDEF(MINT_STARG_O, "starg.o", 2, MintOpUShortInt) -OPDEF(MINT_STARG_P, "starg.p", 2, MintOpUShortInt) -OPDEF(MINT_STARG_VT, "starg.vt", 4, MintOpShortAndInt) - -OPDEF(MINT_LDARGA, "ldarga", 2, MintOpUShortInt) -OPDEF(MINT_LDARGA_VT, "ldarga.vt", 2, MintOpUShortInt) - -OPDEF(MINT_LDFLD_I1, "ldfld.i1", 2, MintOpUShortInt) -OPDEF(MINT_LDFLD_U1, "ldfld.u1", 2, MintOpUShortInt) -OPDEF(MINT_LDFLD_I2, "ldfld.i2", 2, MintOpUShortInt) -OPDEF(MINT_LDFLD_U2, "ldfld.u2", 2, MintOpUShortInt) -OPDEF(MINT_LDFLD_I4, "ldfld.i4", 2, MintOpUShortInt) -OPDEF(MINT_LDFLD_I8, "ldfld.i8", 2, MintOpUShortInt) -OPDEF(MINT_LDFLD_R4, "ldfld.r4", 2, MintOpUShortInt) -OPDEF(MINT_LDFLD_R8, "ldfld.r8", 2, MintOpUShortInt) -OPDEF(MINT_LDFLD_O, "ldfld.o", 2, MintOpUShortInt) -OPDEF(MINT_LDFLD_P, "ldfld.p", 2, MintOpUShortInt) -OPDEF(MINT_LDFLD_VT, "ldfld.vt", 4, MintOpShortAndInt) -OPDEF(MINT_LDFLD_I8_UNALIGNED, "ldfld.i8.unaligned", 2, MintOpUShortInt) -OPDEF(MINT_LDFLD_R8_UNALIGNED, "ldfld.r8.unaligned", 2, MintOpUShortInt) - -OPDEF(MINT_LDRMFLD, "ldrmfld", 2, MintOpFieldToken) -OPDEF(MINT_LDRMFLD_VT, "ldrmfld.vt", 2, MintOpUShortInt) - -OPDEF(MINT_LDFLDA, "ldflda", 2, MintOpUShortInt) -OPDEF(MINT_LDFLDA_UNSAFE, "ldflda.unsafe", 2, MintOpUShortInt) - -OPDEF(MINT_STFLD_I1, "stfld.i1", 2, MintOpUShortInt) -OPDEF(MINT_STFLD_U1, "stfld.u1", 2, MintOpUShortInt) -OPDEF(MINT_STFLD_I2, "stfld.i2", 2, MintOpUShortInt) -OPDEF(MINT_STFLD_U2, "stfld.u2", 2, MintOpUShortInt) -OPDEF(MINT_STFLD_I4, "stfld.i4", 2, MintOpUShortInt) -OPDEF(MINT_STFLD_I8, "stfld.i8", 2, MintOpUShortInt) -OPDEF(MINT_STFLD_R4, "stfld.r4", 2, MintOpUShortInt) -OPDEF(MINT_STFLD_R8, "stfld.r8", 2, MintOpUShortInt) -OPDEF(MINT_STFLD_O, "stfld.o", 2, MintOpUShortInt) -OPDEF(MINT_STFLD_P, "stfld.p", 2, MintOpUShortInt) -OPDEF(MINT_STFLD_VT, "stfld.vt", 3, MintOpTwoShorts) -OPDEF(MINT_STFLD_I8_UNALIGNED, "stfld.i8.unaligned", 2, MintOpUShortInt) -OPDEF(MINT_STFLD_R8_UNALIGNED, "stfld.r8.unaligned", 2, MintOpUShortInt) - -OPDEF(MINT_STRMFLD, "strmfld", 2, MintOpFieldToken) -OPDEF(MINT_STRMFLD_VT, "strmfld.vt", 2, MintOpUShortInt) - -OPDEF(MINT_LDTSFLD_I1, "ldtsfld.i1", 3, MintOpInt) -OPDEF(MINT_LDTSFLD_U1, "ldtsfld.u1", 3, MintOpInt) -OPDEF(MINT_LDTSFLD_I2, "ldtsfld.i2", 3, MintOpInt) -OPDEF(MINT_LDTSFLD_U2, "ldtsfld.u2", 3, MintOpInt) -OPDEF(MINT_LDTSFLD_I4, "ldtsfld.i4", 3, MintOpInt) -OPDEF(MINT_LDTSFLD_I8, "ldtsfld.i8", 3, MintOpInt) -OPDEF(MINT_LDTSFLD_R4, "ldtsfld.r4", 3, MintOpInt) -OPDEF(MINT_LDTSFLD_R8, "ldtsfld.r8", 3, MintOpInt) -OPDEF(MINT_LDTSFLD_O, "ldtsfld.o", 3, MintOpInt) -OPDEF(MINT_LDTSFLD_P, "ldtsfld.p", 3, MintOpInt) -OPDEF(MINT_LDSSFLD, "ldssfld", 4, MintOpFieldToken) -OPDEF(MINT_LDSSFLD_VT, "ldssfld.vt", 5, MintOpInt) - -OPDEF(MINT_LDSFLD_I1, "ldsfld.i1", 3, MintOpUShortInt) -OPDEF(MINT_LDSFLD_U1, "ldsfld.u1", 3, MintOpUShortInt) -OPDEF(MINT_LDSFLD_I2, "ldsfld.i2", 3, MintOpUShortInt) -OPDEF(MINT_LDSFLD_U2, "ldsfld.u2", 3, MintOpUShortInt) -OPDEF(MINT_LDSFLD_I4, "ldsfld.i4", 3, MintOpUShortInt) -OPDEF(MINT_LDSFLD_I8, "ldsfld.i8", 3, MintOpUShortInt) -OPDEF(MINT_LDSFLD_R4, "ldsfld.r4", 3, MintOpUShortInt) -OPDEF(MINT_LDSFLD_R8, "ldsfld.r8", 3, MintOpUShortInt) -OPDEF(MINT_LDSFLD_O, "ldsfld.o", 3, MintOpUShortInt) -OPDEF(MINT_LDSFLD_P, "ldsfld.p", 3, MintOpUShortInt) -OPDEF(MINT_LDSFLD_VT, "ldsfld.vt", 5, MintOpTwoShorts) - -OPDEF(MINT_STTSFLD_I1, "sttsfld.i1", 3, MintOpInt) -OPDEF(MINT_STTSFLD_U1, "sttsfld.u1", 3, MintOpInt) -OPDEF(MINT_STTSFLD_I2, "sttsfld.i2", 3, MintOpInt) -OPDEF(MINT_STTSFLD_U2, "sttsfld.u2", 3, MintOpInt) -OPDEF(MINT_STTSFLD_I4, "sttsfld.i4", 3, MintOpInt) -OPDEF(MINT_STTSFLD_I8, "sttsfld.i8", 3, MintOpInt) -OPDEF(MINT_STTSFLD_R4, "sttsfld.r4", 3, MintOpInt) -OPDEF(MINT_STTSFLD_R8, "sttsfld.r8", 3, MintOpInt) -OPDEF(MINT_STTSFLD_O, "sttsfld.o", 3, MintOpInt) -OPDEF(MINT_STTSFLD_P, "sttsfld.p", 3, MintOpInt) -OPDEF(MINT_STSSFLD, "stssfld", 4, MintOpFieldToken) -OPDEF(MINT_STSSFLD_VT, "stssfld.vt", 5, MintOpInt) -OPDEF(MINT_STSFLD_I1, "stsfld.i1", 3, MintOpUShortInt) -OPDEF(MINT_STSFLD_U1, "stsfld.u1", 3, MintOpUShortInt) -OPDEF(MINT_STSFLD_I2, "stsfld.i2", 3, MintOpUShortInt) -OPDEF(MINT_STSFLD_U2, "stsfld.u2", 3, MintOpUShortInt) -OPDEF(MINT_STSFLD_I4, "stsfld.i4", 3, MintOpUShortInt) -OPDEF(MINT_STSFLD_I8, "stsfld.i8", 3, MintOpUShortInt) -OPDEF(MINT_STSFLD_R4, "stsfld.r4", 3, MintOpUShortInt) -OPDEF(MINT_STSFLD_R8, "stsfld.r8", 3, MintOpUShortInt) -OPDEF(MINT_STSFLD_O, "stsfld.o", 3, MintOpUShortInt) -OPDEF(MINT_STSFLD_P, "stsfld.p", 3, MintOpUShortInt) -OPDEF(MINT_STSFLD_VT, "stsfld.vt", 5, MintOpTwoShorts) -OPDEF(MINT_LDSFLDA, "ldsflda", 3, MintOpTwoShorts) -OPDEF(MINT_LDSSFLDA, "ldssflda", 3, MintOpInt) - -OPDEF(MINT_LDLOC_I1, "ldloc.i1", 2, MintOpUShortInt) -OPDEF(MINT_LDLOC_U1, "ldloc.u1", 2, MintOpUShortInt) -OPDEF(MINT_LDLOC_I2, "ldloc.i2", 2, MintOpUShortInt) -OPDEF(MINT_LDLOC_U2, "ldloc.u2", 2, MintOpUShortInt) -OPDEF(MINT_LDLOC_I4, "ldloc.i4", 2, MintOpUShortInt) -OPDEF(MINT_LDLOC_I8, "ldloc.i8", 2, MintOpUShortInt) -OPDEF(MINT_LDLOC_R4, "ldloc.r4", 2, MintOpUShortInt) -OPDEF(MINT_LDLOC_R8, "ldloc.r8", 2, MintOpUShortInt) -OPDEF(MINT_LDLOC_O, "ldloc.o", 2, MintOpUShortInt) -OPDEF(MINT_LDLOC_P, "ldloc.p", 2, MintOpUShortInt) -OPDEF(MINT_LDLOC_VT, "ldloc.vt", 4, MintOpShortAndInt) - -OPDEF(MINT_STLOC_I1, "stloc.i1", 2, MintOpUShortInt) -OPDEF(MINT_STLOC_U1, "stloc.u1", 2, MintOpUShortInt) -OPDEF(MINT_STLOC_I2, "stloc.i2", 2, MintOpUShortInt) -OPDEF(MINT_STLOC_U2, "stloc.u2", 2, MintOpUShortInt) -OPDEF(MINT_STLOC_I4, "stloc.i4", 2, MintOpUShortInt) -OPDEF(MINT_STLOC_I8, "stloc.i8", 2, MintOpUShortInt) -OPDEF(MINT_STLOC_R4, "stloc.r4", 2, MintOpUShortInt) -OPDEF(MINT_STLOC_R8, "stloc.r8", 2, MintOpUShortInt) -OPDEF(MINT_STLOC_O, "stloc.o", 2, MintOpUShortInt) -OPDEF(MINT_STLOC_P, "stloc.p", 2, MintOpUShortInt) -OPDEF(MINT_STLOC_VT, "stloc.vt", 4, MintOpShortAndInt) - -OPDEF(MINT_STLOC_NP_I4, "stloc.np.i4", 2, MintOpUShortInt) -OPDEF(MINT_STLOC_NP_O, "stloc.np.o", 2, MintOpUShortInt) - -OPDEF(MINT_LDLOCA_S, "ldloca.s", 2, MintOpUShortInt) - -OPDEF(MINT_LDIND_I1_CHECK, "ldind.i1.check", 1, MintOpNoArgs) -OPDEF(MINT_LDIND_U1_CHECK, "ldind.u1.check", 1, MintOpNoArgs) -OPDEF(MINT_LDIND_I2_CHECK, "ldind.i2.check", 1, MintOpNoArgs) -OPDEF(MINT_LDIND_U2_CHECK, "ldind.u2.check", 1, MintOpNoArgs) -OPDEF(MINT_LDIND_I4_CHECK, "ldind.i4.check", 1, MintOpNoArgs) -OPDEF(MINT_LDIND_U4_CHECK, "ldind.u4.check", 1, MintOpNoArgs) -OPDEF(MINT_LDIND_I8_CHECK, "ldind.i8.check", 1, MintOpNoArgs) -OPDEF(MINT_LDIND_I, "ldind.i", 2, MintOpUShortInt) -OPDEF(MINT_LDIND_I8, "ldind.i8", 2, MintOpUShortInt) -OPDEF(MINT_LDIND_R4_CHECK, "ldind.r4.check", 1, MintOpNoArgs) -OPDEF(MINT_LDIND_R8_CHECK, "ldind.r8.check", 1, MintOpNoArgs) -OPDEF(MINT_LDIND_REF, "ldind.ref", 1, MintOpNoArgs) -OPDEF(MINT_LDIND_REF_CHECK, "ldind.ref.check", 1, MintOpNoArgs) -OPDEF(MINT_STIND_I1, "stind.i1", 1, MintOpNoArgs) -OPDEF(MINT_STIND_I2, "stind.i2", 1, MintOpNoArgs) -OPDEF(MINT_STIND_I4, "stind.i4", 1, MintOpNoArgs) -OPDEF(MINT_STIND_I8, "stind.i8", 1, MintOpNoArgs) -OPDEF(MINT_STIND_I, "stind.i", 1, MintOpNoArgs) -OPDEF(MINT_STIND_R4, "stind.r4", 1, MintOpNoArgs) -OPDEF(MINT_STIND_R8, "stind.r8", 1, MintOpNoArgs) -OPDEF(MINT_STIND_REF, "stind.ref", 1, MintOpNoArgs) - -OPDEF(MINT_BR, "br", 3, MintOpBranch) -OPDEF(MINT_LEAVE, "leave", 3, MintOpBranch) -OPDEF(MINT_LEAVE_CHECK, "leave.check", 3, MintOpBranch) -OPDEF(MINT_BR_S, "br.s", 2, MintOpShortBranch) -OPDEF(MINT_LEAVE_S, "leave.s", 2, MintOpShortBranch) -OPDEF(MINT_LEAVE_S_CHECK, "leave.s.check", 2, MintOpShortBranch) - -OPDEF(MINT_THROW, "throw", 1, MintOpNoArgs) -OPDEF(MINT_RETHROW, "rethrow", 2, MintOpUShortInt) -OPDEF(MINT_ENDFINALLY, "endfinally", 2, MintOpNoArgs) -OPDEF(MINT_MONO_RETHROW, "mono_rethrow", 1, MintOpNoArgs) - -OPDEF(MINT_CHECKPOINT, "checkpoint", 1, MintOpNoArgs) -OPDEF(MINT_SAFEPOINT, "safepoint", 1, MintOpNoArgs) - -OPDEF(MINT_BRFALSE_I4, "brfalse.i4", 3, MintOpBranch) -OPDEF(MINT_BRFALSE_I8, "brfalse.i8", 3, MintOpBranch) -OPDEF(MINT_BRFALSE_R4, "brfalse.r4", 3, MintOpBranch) -OPDEF(MINT_BRFALSE_R8, "brfalse.r8", 3, MintOpBranch) -OPDEF(MINT_BRTRUE_I4, "brtrue.i4", 3, MintOpBranch) -OPDEF(MINT_BRTRUE_I8, "brtrue.i8", 3, MintOpBranch) -OPDEF(MINT_BRTRUE_R4, "brtrue.r4", 3, MintOpBranch) -OPDEF(MINT_BRTRUE_R8, "brtrue.r8", 3, MintOpBranch) - -OPDEF(MINT_BRFALSE_I4_S, "brfalse.i4.s", 2, MintOpShortBranch) -OPDEF(MINT_BRFALSE_I8_S, "brfalse.i8.s", 2, MintOpShortBranch) -OPDEF(MINT_BRFALSE_R4_S, "brfalse.r4.s", 2, MintOpShortBranch) -OPDEF(MINT_BRFALSE_R8_S, "brfalse.r8.s", 2, MintOpShortBranch) -OPDEF(MINT_BRTRUE_I4_S, "brtrue.i4.s", 2, MintOpShortBranch) -OPDEF(MINT_BRTRUE_I8_S, "brtrue.i8.s", 2, MintOpShortBranch) -OPDEF(MINT_BRTRUE_R4_S, "brtrue.r4.s", 2, MintOpShortBranch) -OPDEF(MINT_BRTRUE_R8_S, "brtrue.r8.s", 2, MintOpShortBranch) - -OPDEF(MINT_BEQ_I4, "beq.i4", 3, MintOpBranch) -OPDEF(MINT_BEQ_I8, "beq.i8", 3, MintOpBranch) -OPDEF(MINT_BEQ_R4, "beq.r4", 3, MintOpBranch) -OPDEF(MINT_BEQ_R8, "beq.r8", 3, MintOpBranch) -OPDEF(MINT_BGE_I4, "bge.i4", 3, MintOpBranch) -OPDEF(MINT_BGE_I8, "bge.i8", 3, MintOpBranch) -OPDEF(MINT_BGE_R4, "bge.r4", 3, MintOpBranch) -OPDEF(MINT_BGE_R8, "bge.r8", 3, MintOpBranch) -OPDEF(MINT_BGT_I4, "bgt.i4", 3, MintOpBranch) -OPDEF(MINT_BGT_I8, "bgt.i8", 3, MintOpBranch) -OPDEF(MINT_BGT_R4, "bgt.r4", 3, MintOpBranch) -OPDEF(MINT_BGT_R8, "bgt.r8", 3, MintOpBranch) -OPDEF(MINT_BLT_I4, "blt.i4", 3, MintOpBranch) -OPDEF(MINT_BLT_I8, "blt.i8", 3, MintOpBranch) -OPDEF(MINT_BLT_R4, "blt.r4", 3, MintOpBranch) -OPDEF(MINT_BLT_R8, "blt.r8", 3, MintOpBranch) -OPDEF(MINT_BLE_I4, "ble.i4", 3, MintOpBranch) -OPDEF(MINT_BLE_I8, "ble.i8", 3, MintOpBranch) -OPDEF(MINT_BLE_R4, "ble.r4", 3, MintOpBranch) -OPDEF(MINT_BLE_R8, "ble.r8", 3, MintOpBranch) - -OPDEF(MINT_BNE_UN_I4, "bne.un.i4", 3, MintOpBranch) -OPDEF(MINT_BNE_UN_I8, "bne.un.i8", 3, MintOpBranch) -OPDEF(MINT_BNE_UN_R4, "bne.un.r4", 3, MintOpBranch) -OPDEF(MINT_BNE_UN_R8, "bne.un.r8", 3, MintOpBranch) -OPDEF(MINT_BGE_UN_I4, "bge.un.i4", 3, MintOpBranch) -OPDEF(MINT_BGE_UN_I8, "bge.un.i8", 3, MintOpBranch) -OPDEF(MINT_BGE_UN_R4, "bge.un.r4", 3, MintOpBranch) -OPDEF(MINT_BGE_UN_R8, "bge.un.r8", 3, MintOpBranch) -OPDEF(MINT_BGT_UN_I4, "bgt.un.i4", 3, MintOpBranch) -OPDEF(MINT_BGT_UN_I8, "bgt.un.i8", 3, MintOpBranch) -OPDEF(MINT_BGT_UN_R4, "bgt.un.r4", 3, MintOpBranch) -OPDEF(MINT_BGT_UN_R8, "bgt.un.r8", 3, MintOpBranch) -OPDEF(MINT_BLE_UN_I4, "ble.un.i4", 3, MintOpBranch) -OPDEF(MINT_BLE_UN_I8, "ble.un.i8", 3, MintOpBranch) -OPDEF(MINT_BLE_UN_R4, "ble.un.r4", 3, MintOpBranch) -OPDEF(MINT_BLE_UN_R8, "ble.un.r8", 3, MintOpBranch) -OPDEF(MINT_BLT_UN_I4, "blt.un.i4", 3, MintOpBranch) -OPDEF(MINT_BLT_UN_I8, "blt.un.i8", 3, MintOpBranch) -OPDEF(MINT_BLT_UN_R4, "blt.un.r4", 3, MintOpBranch) -OPDEF(MINT_BLT_UN_R8, "blt.un.r8", 3, MintOpBranch) - -OPDEF(MINT_BEQ_I4_S, "beq.i4.s", 2, MintOpShortBranch) -OPDEF(MINT_BEQ_I8_S, "beq.i8.s", 2, MintOpShortBranch) -OPDEF(MINT_BEQ_R4_S, "beq.r4.s", 2, MintOpShortBranch) -OPDEF(MINT_BEQ_R8_S, "beq.r8.s", 2, MintOpShortBranch) -OPDEF(MINT_BGE_I4_S, "bge.i4.s", 2, MintOpShortBranch) -OPDEF(MINT_BGE_I8_S, "bge.i8.s", 2, MintOpShortBranch) -OPDEF(MINT_BGE_R4_S, "bge.r4.s", 2, MintOpShortBranch) -OPDEF(MINT_BGE_R8_S, "bge.r8.s", 2, MintOpShortBranch) -OPDEF(MINT_BGT_I4_S, "bgt.i4.s", 2, MintOpShortBranch) -OPDEF(MINT_BGT_I8_S, "bgt.i8.s", 2, MintOpShortBranch) -OPDEF(MINT_BGT_R4_S, "bgt.r4.s", 2, MintOpShortBranch) -OPDEF(MINT_BGT_R8_S, "bgt.r8.s", 2, MintOpShortBranch) -OPDEF(MINT_BLT_I4_S, "blt.i4.s", 2, MintOpShortBranch) -OPDEF(MINT_BLT_I8_S, "blt.i8.s", 2, MintOpShortBranch) -OPDEF(MINT_BLT_R4_S, "blt.r4.s", 2, MintOpShortBranch) -OPDEF(MINT_BLT_R8_S, "blt.r8.s", 2, MintOpShortBranch) -OPDEF(MINT_BLE_I4_S, "ble.i4.s", 2, MintOpShortBranch) -OPDEF(MINT_BLE_I8_S, "ble.i8.s", 2, MintOpShortBranch) -OPDEF(MINT_BLE_R4_S, "ble.r4.s", 2, MintOpShortBranch) -OPDEF(MINT_BLE_R8_S, "ble.r8.s", 2, MintOpShortBranch) - -OPDEF(MINT_BNE_UN_I4_S, "bne.un.i4.s", 2, MintOpShortBranch) -OPDEF(MINT_BNE_UN_I8_S, "bne.un.i8.s", 2, MintOpShortBranch) -OPDEF(MINT_BNE_UN_R4_S, "bne.un.r4.s", 2, MintOpShortBranch) -OPDEF(MINT_BNE_UN_R8_S, "bne.un.r8.s", 2, MintOpShortBranch) -OPDEF(MINT_BGE_UN_I4_S, "bge.un.i4.s", 2, MintOpShortBranch) -OPDEF(MINT_BGE_UN_I8_S, "bge.un.i8.s", 2, MintOpShortBranch) -OPDEF(MINT_BGE_UN_R4_S, "bge.un.r4.s", 2, MintOpShortBranch) -OPDEF(MINT_BGE_UN_R8_S, "bge.un.r8.s", 2, MintOpShortBranch) -OPDEF(MINT_BGT_UN_I4_S, "bgt.un.i4.s", 2, MintOpShortBranch) -OPDEF(MINT_BGT_UN_I8_S, "bgt.un.i8.s", 2, MintOpShortBranch) -OPDEF(MINT_BGT_UN_R4_S, "bgt.un.r4.s", 2, MintOpShortBranch) -OPDEF(MINT_BGT_UN_R8_S, "bgt.un.r8.s", 2, MintOpShortBranch) -OPDEF(MINT_BLE_UN_I4_S, "ble.un.i4.s", 2, MintOpShortBranch) -OPDEF(MINT_BLE_UN_I8_S, "ble.un.i8.s", 2, MintOpShortBranch) -OPDEF(MINT_BLE_UN_R4_S, "ble.un.r4.s", 2, MintOpShortBranch) -OPDEF(MINT_BLE_UN_R8_S, "ble.un.r8.s", 2, MintOpShortBranch) -OPDEF(MINT_BLT_UN_I4_S, "blt.un.i4.s", 2, MintOpShortBranch) -OPDEF(MINT_BLT_UN_I8_S, "blt.un.i8.s", 2, MintOpShortBranch) -OPDEF(MINT_BLT_UN_R4_S, "blt.un.r4.s", 2, MintOpShortBranch) -OPDEF(MINT_BLT_UN_R8_S, "blt.un.r8.s", 2, MintOpShortBranch) - -OPDEF(MINT_SWITCH, "switch", 0, MintOpSwitch) - -OPDEF(MINT_LDSTR, "ldstr", 2, MintOpMethodToken) /* not really */ -OPDEF(MINT_LDSTR_TOKEN, "ldstr.token", 2, MintOpMethodToken) /* not really */ - -OPDEF(MINT_CALL, "call", 2, MintOpMethodToken) -OPDEF(MINT_VCALL, "vcall", 2, MintOpMethodToken) -OPDEF(MINT_CALLVIRT, "callvirt", 2, MintOpMethodToken) -OPDEF(MINT_VCALLVIRT, "vcallvirt", 2, MintOpMethodToken) -OPDEF(MINT_CALLVIRT_FAST, "callvirt.fast", 3, MintOpMethodToken) -OPDEF(MINT_VCALLVIRT_FAST, "vcallvirt.fast", 3, MintOpMethodToken) -OPDEF(MINT_CALLI, "calli", 2, MintOpMethodToken) -OPDEF(MINT_CALLI_NAT, "calli.nat", 3, MintOpMethodToken) -OPDEF(MINT_CALLI_NAT_FAST, "calli.nat.fast", 4, MintOpMethodToken) -OPDEF(MINT_CALL_VARARG, "call.vararg", 3, MintOpMethodToken) -OPDEF(MINT_JMP, "jmp", 2, MintOpMethodToken) - -OPDEF(MINT_CALLRUN, "callrun", 3, MintOpNoArgs) - -OPDEF(MINT_ENDFILTER, "endfilter", 1, MintOpNoArgs) - -OPDEF(MINT_NEWOBJ, "newobj", 2, MintOpMethodToken) -OPDEF(MINT_NEWOBJ_ARRAY, "newobj_array", 3, MintOpMethodToken) -OPDEF(MINT_NEWOBJ_FAST, "newobj_fast", 4, MintOpMethodToken) -OPDEF(MINT_NEWOBJ_VT_FAST, "newobj_vt_fast", 3, MintOpMethodToken) -OPDEF(MINT_NEWOBJ_VTST_FAST, "newobj_vtst_fast", 4, MintOpMethodToken) -OPDEF(MINT_NEWOBJ_MAGIC, "newobj_magic", 2, MintOpMethodToken) -OPDEF(MINT_INITOBJ, "initobj", 3, MintOpInt) -OPDEF(MINT_CASTCLASS, "castclass", 2, MintOpClassToken) -OPDEF(MINT_ISINST, "isinst", 2, MintOpClassToken) -OPDEF(MINT_CASTCLASS_INTERFACE, "castclass.interface", 2, MintOpClassToken) -OPDEF(MINT_ISINST_INTERFACE, "isinst.interface", 2, MintOpClassToken) -OPDEF(MINT_CASTCLASS_COMMON, "castclass.common", 2, MintOpClassToken) -OPDEF(MINT_ISINST_COMMON, "isinst.common", 2, MintOpClassToken) -OPDEF(MINT_NEWARR, "newarr", 2, MintOpClassToken) -OPDEF(MINT_BOX, "box", 3, MintOpTwoShorts) -OPDEF(MINT_BOX_VT, "box.vt", 3, MintOpTwoShorts) -OPDEF(MINT_BOX_NULLABLE, "box.nullable", 3, MintOpTwoShorts) -OPDEF(MINT_UNBOX, "unbox", 2, MintOpClassToken) -OPDEF(MINT_LDTOKEN, "ldtoken", 2, MintOpClassToken) /* not really */ -OPDEF(MINT_LDFTN, "ldftn", 2, MintOpMethodToken) -OPDEF(MINT_LDFTN_DYNAMIC, "ldftn.dynamic", 1, MintOpMethodToken) -OPDEF(MINT_LDVIRTFTN, "ldvirtftn", 2, MintOpMethodToken) -OPDEF(MINT_CPOBJ, "cpobj", 2, MintOpClassToken) -OPDEF(MINT_CPOBJ_VT, "cpobj.vt", 2, MintOpClassToken) -OPDEF(MINT_LDOBJ_VT, "ldobj.vt", 3, MintOpInt) -OPDEF(MINT_STOBJ_VT, "stobj.vt", 2, MintOpClassToken) -OPDEF(MINT_CPBLK, "cpblk", 1, MintOpNoArgs) -OPDEF(MINT_INITBLK, "initblk", 1, MintOpNoArgs) -OPDEF(MINT_LOCALLOC, "localloc", 1, MintOpNoArgs) -OPDEF(MINT_INITLOCALS, "initlocals", 1, MintOpNoArgs) - -OPDEF(MINT_LDELEM_I, "ldelem.i", 1, MintOpNoArgs) -OPDEF(MINT_LDELEM_I1, "ldelem.i1", 1, MintOpNoArgs) -OPDEF(MINT_LDELEM_U1, "ldelem.u1", 1, MintOpNoArgs) -OPDEF(MINT_LDELEM_I2, "ldelem.i2", 1, MintOpNoArgs) -OPDEF(MINT_LDELEM_U2, "ldelem.u2", 1, MintOpNoArgs) -OPDEF(MINT_LDELEM_I4, "ldelem.i4", 1, MintOpNoArgs) -OPDEF(MINT_LDELEM_U4, "ldelem.u4", 1, MintOpNoArgs) -OPDEF(MINT_LDELEM_I8, "ldelem.i8", 1, MintOpNoArgs) -OPDEF(MINT_LDELEM_R4, "ldelem.r4", 1, MintOpNoArgs) -OPDEF(MINT_LDELEM_R8, "ldelem.r8", 1, MintOpNoArgs) -OPDEF(MINT_LDELEM_REF, "ldelem.ref", 1, MintOpNoArgs) -OPDEF(MINT_LDELEM_VT, "ldelem.vt", 3, MintOpInt) - -OPDEF(MINT_LDELEMA, "ldelema", 3, MintOpTwoShorts) -OPDEF(MINT_LDELEMA_TC, "ldelema.tc", 3, MintOpTwoShorts) -OPDEF(MINT_LDELEMA_FAST, "ldelema.fast", 3, MintOpInt) - -OPDEF(MINT_STELEM_I, "stelem.i", 1, MintOpNoArgs) -OPDEF(MINT_STELEM_I1, "stelem.i1", 1, MintOpNoArgs) -OPDEF(MINT_STELEM_U1, "stelem.u1", 1, MintOpNoArgs) -OPDEF(MINT_STELEM_I2, "stelem.i2", 1, MintOpNoArgs) -OPDEF(MINT_STELEM_U2, "stelem.u2", 1, MintOpNoArgs) -OPDEF(MINT_STELEM_I4, "stelem.i4", 1, MintOpNoArgs) -OPDEF(MINT_STELEM_I8, "stelem.i8", 1, MintOpNoArgs) -OPDEF(MINT_STELEM_R4, "stelem.r4", 1, MintOpNoArgs) -OPDEF(MINT_STELEM_R8, "stelem.r8", 1, MintOpNoArgs) -OPDEF(MINT_STELEM_REF, "stelem.ref", 1, MintOpNoArgs) -OPDEF(MINT_STELEM_VT, "stelem.vt", 4, MintOpShortAndInt) - -OPDEF(MINT_LDLEN, "ldlen", 1, MintOpNoArgs) -OPDEF(MINT_LDLEN_SPAN, "ldlen.span", 2, MintOpShortInt) - -OPDEF(MINT_GETITEM_SPAN, "getitem.span", 4, MintOpShortAndInt) - -OPDEF(MINT_ADD_I4, "add.i4", 1, MintOpNoArgs) -OPDEF(MINT_ADD_I8, "add.i8", 1, MintOpNoArgs) -OPDEF(MINT_ADD_R4, "add.r4", 1, MintOpNoArgs) -OPDEF(MINT_ADD_R8, "add.r8", 1, MintOpNoArgs) - -OPDEF(MINT_ADD1_I4, "add1.i4", 1, MintOpNoArgs) -OPDEF(MINT_ADD1_I8, "add1.i8", 1, MintOpNoArgs) - -OPDEF(MINT_SUB_I4, "sub.i4", 1, MintOpNoArgs) -OPDEF(MINT_SUB_I8, "sub.i8", 1, MintOpNoArgs) -OPDEF(MINT_SUB_R4, "sub.r4", 1, MintOpNoArgs) -OPDEF(MINT_SUB_R8, "sub.r8", 1, MintOpNoArgs) - -OPDEF(MINT_SUB1_I4, "sub1.i4", 1, MintOpNoArgs) -OPDEF(MINT_SUB1_I8, "sub1.i8", 1, MintOpNoArgs) - -OPDEF(MINT_MUL_I4, "mul.i4", 1, MintOpNoArgs) -OPDEF(MINT_MUL_I8, "mul.i8", 1, MintOpNoArgs) -OPDEF(MINT_MUL_R4, "mul.r4", 1, MintOpNoArgs) -OPDEF(MINT_MUL_R8, "mul.r8", 1, MintOpNoArgs) - -OPDEF(MINT_DIV_I4, "div.i4", 1, MintOpNoArgs) -OPDEF(MINT_DIV_I8, "div.i8", 1, MintOpNoArgs) -OPDEF(MINT_DIV_R4, "div.r4", 1, MintOpNoArgs) -OPDEF(MINT_DIV_R8, "div.r8", 1, MintOpNoArgs) - -OPDEF(MINT_DIV_UN_I4, "div.un.i4", 1, MintOpNoArgs) -OPDEF(MINT_DIV_UN_I8, "div.un.i8", 1, MintOpNoArgs) - -OPDEF(MINT_ADD_OVF_I4, "add.ovf.i4", 1, MintOpNoArgs) -OPDEF(MINT_ADD_OVF_I8, "add.ovf.i8", 1, MintOpNoArgs) - -OPDEF(MINT_ADD_OVF_UN_I4, "add.ovf.un.i4", 1, MintOpNoArgs) -OPDEF(MINT_ADD_OVF_UN_I8, "add.ovf.un.i8", 1, MintOpNoArgs) - -OPDEF(MINT_MUL_OVF_I4, "mul.ovf.i4", 1, MintOpNoArgs) -OPDEF(MINT_MUL_OVF_I8, "mul.ovf.i8", 1, MintOpNoArgs) - -OPDEF(MINT_MUL_OVF_UN_I4, "mul.ovf.un.i4", 1, MintOpNoArgs) -OPDEF(MINT_MUL_OVF_UN_I8, "mul.ovf.un.i8", 1, MintOpNoArgs) - -OPDEF(MINT_SUB_OVF_I4, "sub.ovf.i4", 1, MintOpNoArgs) -OPDEF(MINT_SUB_OVF_I8, "sub.ovf.i8", 1, MintOpNoArgs) - -OPDEF(MINT_SUB_OVF_UN_I4, "sub.ovf.un.i4", 1, MintOpNoArgs) -OPDEF(MINT_SUB_OVF_UN_I8, "sub.ovf.un.i8", 1, MintOpNoArgs) - -OPDEF(MINT_NEG_I4, "neg.i4", 1, MintOpNoArgs) -OPDEF(MINT_NEG_I8, "neg.i8", 1, MintOpNoArgs) -OPDEF(MINT_NEG_R4, "neg.r4", 1, MintOpNoArgs) -OPDEF(MINT_NEG_R8, "neg.r8", 1, MintOpNoArgs) - -OPDEF(MINT_NOT_I4, "not.i4", 1, MintOpNoArgs) -OPDEF(MINT_NOT_I8, "not.i8", 1, MintOpNoArgs) - -OPDEF(MINT_AND_I4, "and.i4", 1, MintOpNoArgs) -OPDEF(MINT_AND_I8, "and.i8", 1, MintOpNoArgs) - -OPDEF(MINT_OR_I4, "or.i4", 1, MintOpNoArgs) -OPDEF(MINT_OR_I8, "or.i8", 1, MintOpNoArgs) - -OPDEF(MINT_XOR_I4, "xor.i4", 1, MintOpNoArgs) -OPDEF(MINT_XOR_I8, "xor.i8", 1, MintOpNoArgs) - -OPDEF(MINT_REM_I4, "rem.i4", 1, MintOpNoArgs) -OPDEF(MINT_REM_I8, "rem.i8", 1, MintOpNoArgs) -OPDEF(MINT_REM_R4, "rem.r4", 1, MintOpNoArgs) -OPDEF(MINT_REM_R8, "rem.r8", 1, MintOpNoArgs) - -OPDEF(MINT_REM_UN_I4, "rem.un.i4", 1, MintOpNoArgs) -OPDEF(MINT_REM_UN_I8, "rem.un.i8", 1, MintOpNoArgs) - -OPDEF(MINT_SHR_UN_I4, "shr.un.i4", 1, MintOpNoArgs) -OPDEF(MINT_SHR_UN_I8, "shr.un.i8", 1, MintOpNoArgs) -OPDEF(MINT_SHL_I4, "shl.i4", 1, MintOpNoArgs) -OPDEF(MINT_SHL_I8, "shl.i8", 1, MintOpNoArgs) -OPDEF(MINT_SHR_I4, "shr.i4", 1, MintOpNoArgs) -OPDEF(MINT_SHR_I8, "shr.i8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_R_UN_I4, "conv.r.un.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_R_UN_I8, "conv.r.un.i8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_I1_I4, "conv.i1.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_I1_I8, "conv.i1.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_I1_R4, "conv.i1.r4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_I1_R8, "conv.i1.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_U1_I4, "conv.u1.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_U1_I8, "conv.u1.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_U1_R4, "conv.u1.r4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_U1_R8, "conv.u1.r8", 1, MintOpNoArgs) +/* OPDEF (opsymbol, opstring, oplength (in uint16s), pop_n, push_n, optype) */ + +OPDEF(MINT_NOP, "nop", 0, Pop0, Push0, MintOpNoArgs) +OPDEF(MINT_NIY, "niy", 1, Pop0, Push0, MintOpNoArgs) +OPDEF(MINT_BREAK, "break", 1, Pop0, Push0, MintOpNoArgs) +OPDEF(MINT_BREAKPOINT, "breakpoint", 1, Pop0, Push0, MintOpNoArgs) +OPDEF(MINT_LDNULL, "ldnull", 1, Pop0, Push1, MintOpNoArgs) +OPDEF(MINT_DUP, "dup", 1, Pop1, Push2, MintOpNoArgs) +OPDEF(MINT_DUP_VT, "dup.vt", 3, Pop1, Push2, MintOpInt) +OPDEF(MINT_POP, "pop", 2, Pop1, Push0, MintOpShortInt) + +OPDEF(MINT_RET, "ret", 1, Pop1, Push0, MintOpNoArgs) +OPDEF(MINT_RET_VOID, "ret.void", 1, Pop0, Push0, MintOpNoArgs) +OPDEF(MINT_RET_VT, "ret.vt", 3, Pop1, Push0, MintOpInt) + +/* FIXME if ret_size != null it clobbers sp [-1] */ +OPDEF(MINT_VTRESULT, "vtresult", 4, Pop0, Push0, MintOpShortAndInt) /*FIX should be unsigned*/ + +OPDEF(MINT_LDC_I4_M1, "ldc.i4.m1", 1, Pop0, Push1, MintOpNoArgs) +OPDEF(MINT_LDC_I4_0, "ldc.i4.0", 1, Pop0, Push1, MintOpNoArgs) +OPDEF(MINT_LDC_I4_1, "ldc.i4.1", 1, Pop0, Push1, MintOpNoArgs) +OPDEF(MINT_LDC_I4_2, "ldc.i4.2", 1, Pop0, Push1, MintOpNoArgs) +OPDEF(MINT_LDC_I4_3, "ldc.i4.3", 1, Pop0, Push1, MintOpNoArgs) +OPDEF(MINT_LDC_I4_4, "ldc.i4.4", 1, Pop0, Push1, MintOpNoArgs) +OPDEF(MINT_LDC_I4_5, "ldc.i4.5", 1, Pop0, Push1, MintOpNoArgs) +OPDEF(MINT_LDC_I4_6, "ldc.i4.6", 1, Pop0, Push1, MintOpNoArgs) +OPDEF(MINT_LDC_I4_7, "ldc.i4.7", 1, Pop0, Push1, MintOpNoArgs) +OPDEF(MINT_LDC_I4_8, "ldc.i4.8", 1, Pop0, Push1, MintOpNoArgs) + +OPDEF(MINT_LDC_I4_S, "ldc.i4.s", 2, Pop0, Push1, MintOpShortInt) +OPDEF(MINT_LDC_I4, "ldc.i4", 3, Pop0, Push1, MintOpInt) +OPDEF(MINT_LDC_I8, "ldc.i8", 5, Pop0, Push1, MintOpLongInt) +OPDEF(MINT_LDC_I8_S, "ldc.i8.s", 2, Pop0, Push1, MintOpShortInt) + +OPDEF(MINT_LDC_R4, "ldc.r4", 3, Pop0, Push1, MintOpFloat) +OPDEF(MINT_LDC_R8, "ldc.r8", 5, Pop0, Push1, MintOpDouble) + +OPDEF(MINT_ARGLIST, "arglist", 1, Pop0, Push1, MintOpNoArgs) + +OPDEF(MINT_LDARG_I1, "ldarg.i1", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDARG_U1, "ldarg.u1", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDARG_I2, "ldarg.i2", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDARG_U2, "ldarg.u2", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDARG_I4, "ldarg.i4", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDARG_I8, "ldarg.i8", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDARG_R4, "ldarg.r4", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDARG_R8, "ldarg.r8", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDARG_O, "ldarg.o", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDARG_P, "ldarg.p", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDARG_VT, "ldarg.vt", 4, Pop0, Push1, MintOpShortAndInt) + +OPDEF(MINT_STARG_I1, "starg.i1", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STARG_U1, "starg.u1", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STARG_I2, "starg.i2", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STARG_U2, "starg.u2", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STARG_I4, "starg.i4", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STARG_I8, "starg.i8", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STARG_R4, "starg.r4", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STARG_R8, "starg.r8", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STARG_O, "starg.o", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STARG_P, "starg.p", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STARG_VT, "starg.vt", 4, Pop1, Push0, MintOpShortAndInt) + +OPDEF(MINT_LDARGA, "ldarga", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDARGA_VT, "ldarga.vt", 2, Pop0, Push1, MintOpUShortInt) + +OPDEF(MINT_LDFLD_I1, "ldfld.i1", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDFLD_U1, "ldfld.u1", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDFLD_I2, "ldfld.i2", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDFLD_U2, "ldfld.u2", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDFLD_I4, "ldfld.i4", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDFLD_I8, "ldfld.i8", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDFLD_R4, "ldfld.r4", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDFLD_R8, "ldfld.r8", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDFLD_O, "ldfld.o", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDFLD_P, "ldfld.p", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDFLD_VT, "ldfld.vt", 4, Pop1, Push1, MintOpShortAndInt) +OPDEF(MINT_LDFLD_I8_UNALIGNED, "ldfld.i8.unaligned", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDFLD_R8_UNALIGNED, "ldfld.r8.unaligned", 2, Pop1, Push1, MintOpUShortInt) + +OPDEF(MINT_LDRMFLD, "ldrmfld", 2, Pop1, Push1, MintOpFieldToken) +OPDEF(MINT_LDRMFLD_VT, "ldrmfld.vt", 2, Pop1, Push1, MintOpUShortInt) + +OPDEF(MINT_LDFLDA, "ldflda", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDFLDA_UNSAFE, "ldflda.unsafe", 2, Pop1, Push1, MintOpUShortInt) + +OPDEF(MINT_STFLD_I1, "stfld.i1", 2, Pop2, Push0, MintOpUShortInt) +OPDEF(MINT_STFLD_U1, "stfld.u1", 2, Pop2, Push0, MintOpUShortInt) +OPDEF(MINT_STFLD_I2, "stfld.i2", 2, Pop2, Push0, MintOpUShortInt) +OPDEF(MINT_STFLD_U2, "stfld.u2", 2, Pop2, Push0, MintOpUShortInt) +OPDEF(MINT_STFLD_I4, "stfld.i4", 2, Pop2, Push0, MintOpUShortInt) +OPDEF(MINT_STFLD_I8, "stfld.i8", 2, Pop2, Push0, MintOpUShortInt) +OPDEF(MINT_STFLD_R4, "stfld.r4", 2, Pop2, Push0, MintOpUShortInt) +OPDEF(MINT_STFLD_R8, "stfld.r8", 2, Pop2, Push0, MintOpUShortInt) +OPDEF(MINT_STFLD_O, "stfld.o", 2, Pop2, Push0, MintOpUShortInt) +OPDEF(MINT_STFLD_P, "stfld.p", 2, Pop2, Push0, MintOpUShortInt) +OPDEF(MINT_STFLD_VT, "stfld.vt", 3, Pop2, Push0, MintOpTwoShorts) +OPDEF(MINT_STFLD_I8_UNALIGNED, "stfld.i8.unaligned", 2, Pop2, Push0, MintOpUShortInt) +OPDEF(MINT_STFLD_R8_UNALIGNED, "stfld.r8.unaligned", 2, Pop2, Push0, MintOpUShortInt) + +OPDEF(MINT_STRMFLD, "strmfld", 2, Pop2, Push0, MintOpFieldToken) +OPDEF(MINT_STRMFLD_VT, "strmfld.vt", 2, Pop2, Push0, MintOpUShortInt) + +OPDEF(MINT_LDTSFLD_I1, "ldtsfld.i1", 3, Pop0, Push1, MintOpInt) +OPDEF(MINT_LDTSFLD_U1, "ldtsfld.u1", 3, Pop0, Push1, MintOpInt) +OPDEF(MINT_LDTSFLD_I2, "ldtsfld.i2", 3, Pop0, Push1, MintOpInt) +OPDEF(MINT_LDTSFLD_U2, "ldtsfld.u2", 3, Pop0, Push1, MintOpInt) +OPDEF(MINT_LDTSFLD_I4, "ldtsfld.i4", 3, Pop0, Push1, MintOpInt) +OPDEF(MINT_LDTSFLD_I8, "ldtsfld.i8", 3, Pop0, Push1, MintOpInt) +OPDEF(MINT_LDTSFLD_R4, "ldtsfld.r4", 3, Pop0, Push1, MintOpInt) +OPDEF(MINT_LDTSFLD_R8, "ldtsfld.r8", 3, Pop0, Push1, MintOpInt) +OPDEF(MINT_LDTSFLD_O, "ldtsfld.o", 3, Pop0, Push1, MintOpInt) +OPDEF(MINT_LDTSFLD_P, "ldtsfld.p", 3, Pop0, Push1, MintOpInt) +OPDEF(MINT_LDSSFLD, "ldssfld", 4, Pop0, Push1, MintOpFieldToken) +OPDEF(MINT_LDSSFLD_VT, "ldssfld.vt", 5, Pop0, Push1, MintOpInt) + +OPDEF(MINT_LDSFLD_I1, "ldsfld.i1", 3, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDSFLD_U1, "ldsfld.u1", 3, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDSFLD_I2, "ldsfld.i2", 3, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDSFLD_U2, "ldsfld.u2", 3, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDSFLD_I4, "ldsfld.i4", 3, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDSFLD_I8, "ldsfld.i8", 3, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDSFLD_R4, "ldsfld.r4", 3, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDSFLD_R8, "ldsfld.r8", 3, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDSFLD_O, "ldsfld.o", 3, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDSFLD_P, "ldsfld.p", 3, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDSFLD_VT, "ldsfld.vt", 5, Pop0, Push1, MintOpTwoShorts) + +OPDEF(MINT_STTSFLD_I1, "sttsfld.i1", 3, Pop1, Push0, MintOpInt) +OPDEF(MINT_STTSFLD_U1, "sttsfld.u1", 3, Pop1, Push0, MintOpInt) +OPDEF(MINT_STTSFLD_I2, "sttsfld.i2", 3, Pop1, Push0, MintOpInt) +OPDEF(MINT_STTSFLD_U2, "sttsfld.u2", 3, Pop1, Push0, MintOpInt) +OPDEF(MINT_STTSFLD_I4, "sttsfld.i4", 3, Pop1, Push0, MintOpInt) +OPDEF(MINT_STTSFLD_I8, "sttsfld.i8", 3, Pop1, Push0, MintOpInt) +OPDEF(MINT_STTSFLD_R4, "sttsfld.r4", 3, Pop1, Push0, MintOpInt) +OPDEF(MINT_STTSFLD_R8, "sttsfld.r8", 3, Pop1, Push0, MintOpInt) +OPDEF(MINT_STTSFLD_O, "sttsfld.o", 3, Pop1, Push0, MintOpInt) +OPDEF(MINT_STTSFLD_P, "sttsfld.p", 3, Pop1, Push0, MintOpInt) +OPDEF(MINT_STSSFLD, "stssfld", 4, Pop1, Push0, MintOpFieldToken) +OPDEF(MINT_STSSFLD_VT, "stssfld.vt", 5, Pop1, Push0, MintOpInt) +OPDEF(MINT_STSFLD_I1, "stsfld.i1", 3, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STSFLD_U1, "stsfld.u1", 3, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STSFLD_I2, "stsfld.i2", 3, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STSFLD_U2, "stsfld.u2", 3, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STSFLD_I4, "stsfld.i4", 3, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STSFLD_I8, "stsfld.i8", 3, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STSFLD_R4, "stsfld.r4", 3, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STSFLD_R8, "stsfld.r8", 3, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STSFLD_O, "stsfld.o", 3, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STSFLD_P, "stsfld.p", 3, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STSFLD_VT, "stsfld.vt", 5, Pop1, Push0, MintOpTwoShorts) +OPDEF(MINT_LDSFLDA, "ldsflda", 3, Pop0, Push1, MintOpTwoShorts) +OPDEF(MINT_LDSSFLDA, "ldssflda", 3, Pop0, Push1, MintOpInt) + +OPDEF(MINT_LDLOC_I1, "ldloc.i1", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDLOC_U1, "ldloc.u1", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDLOC_I2, "ldloc.i2", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDLOC_U2, "ldloc.u2", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDLOC_I4, "ldloc.i4", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDLOC_I8, "ldloc.i8", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDLOC_R4, "ldloc.r4", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDLOC_R8, "ldloc.r8", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDLOC_O, "ldloc.o", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDLOC_P, "ldloc.p", 2, Pop0, Push1, MintOpUShortInt) +OPDEF(MINT_LDLOC_VT, "ldloc.vt", 4, Pop0, Push1, MintOpShortAndInt) + +OPDEF(MINT_STLOC_I1, "stloc.i1", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STLOC_U1, "stloc.u1", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STLOC_I2, "stloc.i2", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STLOC_U2, "stloc.u2", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STLOC_I4, "stloc.i4", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STLOC_I8, "stloc.i8", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STLOC_R4, "stloc.r4", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STLOC_R8, "stloc.r8", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STLOC_O, "stloc.o", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STLOC_P, "stloc.p", 2, Pop1, Push0, MintOpUShortInt) +OPDEF(MINT_STLOC_VT, "stloc.vt", 4, Pop1, Push0, MintOpShortAndInt) + +OPDEF(MINT_STLOC_NP_I4, "stloc.np.i4", 2, Pop0, Push0, MintOpUShortInt) +OPDEF(MINT_STLOC_NP_O, "stloc.np.o", 2, Pop0, Push0, MintOpUShortInt) + +OPDEF(MINT_MOVLOC_1, "movloc.1", 3, Pop0, Push0, MintOpTwoShorts) +OPDEF(MINT_MOVLOC_2, "movloc.2", 3, Pop0, Push0, MintOpTwoShorts) +OPDEF(MINT_MOVLOC_4, "movloc.4", 3, Pop0, Push0, MintOpTwoShorts) +OPDEF(MINT_MOVLOC_8, "movloc.8", 3, Pop0, Push0, MintOpTwoShorts) +OPDEF(MINT_MOVLOC_VT, "movloc.vt", 5, Pop0, Push0, MintOpTwoShorts) + +OPDEF(MINT_LDLOCA_S, "ldloca.s", 2, Pop0, Push1, MintOpUShortInt) + +OPDEF(MINT_LDIND_I1_CHECK, "ldind.i1.check", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_LDIND_U1_CHECK, "ldind.u1.check", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_LDIND_I2_CHECK, "ldind.i2.check", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_LDIND_U2_CHECK, "ldind.u2.check", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_LDIND_I4_CHECK, "ldind.i4.check", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_LDIND_U4_CHECK, "ldind.u4.check", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_LDIND_I8_CHECK, "ldind.i8.check", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_LDIND_I, "ldind.i", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDIND_I8, "ldind.i8", 2, Pop1, Push1, MintOpUShortInt) +OPDEF(MINT_LDIND_R4_CHECK, "ldind.r4.check", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_LDIND_R8_CHECK, "ldind.r8.check", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_LDIND_REF, "ldind.ref", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_LDIND_REF_CHECK, "ldind.ref.check", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_STIND_I1, "stind.i1", 1, Pop2, Push0, MintOpNoArgs) +OPDEF(MINT_STIND_I2, "stind.i2", 1, Pop2, Push0, MintOpNoArgs) +OPDEF(MINT_STIND_I4, "stind.i4", 1, Pop2, Push0, MintOpNoArgs) +OPDEF(MINT_STIND_I8, "stind.i8", 1, Pop2, Push0, MintOpNoArgs) +OPDEF(MINT_STIND_I, "stind.i", 1, Pop2, Push0, MintOpNoArgs) +OPDEF(MINT_STIND_R4, "stind.r4", 1, Pop2, Push0, MintOpNoArgs) +OPDEF(MINT_STIND_R8, "stind.r8", 1, Pop2, Push0, MintOpNoArgs) +OPDEF(MINT_STIND_REF, "stind.ref", 1, Pop2, Push0, MintOpNoArgs) + +OPDEF(MINT_BR, "br", 3, Pop0, Push0, MintOpBranch) +OPDEF(MINT_LEAVE, "leave", 3, PopAll, Push0, MintOpBranch) +OPDEF(MINT_LEAVE_CHECK, "leave.check", 3, PopAll, Push0, MintOpBranch) +OPDEF(MINT_BR_S, "br.s", 2, Pop0, Push0, MintOpShortBranch) +OPDEF(MINT_LEAVE_S, "leave.s", 2, PopAll, Push0, MintOpShortBranch) +OPDEF(MINT_LEAVE_S_CHECK, "leave.s.check", 2, PopAll, Push0, MintOpShortBranch) + +OPDEF(MINT_THROW, "throw", 1, Pop1, Push0, MintOpNoArgs) +OPDEF(MINT_RETHROW, "rethrow", 2, Pop0, Push0, MintOpUShortInt) +OPDEF(MINT_ENDFINALLY, "endfinally", 2, PopAll, Push0, MintOpNoArgs) +OPDEF(MINT_MONO_RETHROW, "mono_rethrow", 1, Pop1, Push0, MintOpNoArgs) + +OPDEF(MINT_CHECKPOINT, "checkpoint", 1, Pop0, Push0, MintOpNoArgs) +OPDEF(MINT_SAFEPOINT, "safepoint", 1, Pop0, Push0, MintOpNoArgs) + +OPDEF(MINT_BRFALSE_I4, "brfalse.i4", 3, Pop1, Push0, MintOpBranch) +OPDEF(MINT_BRFALSE_I8, "brfalse.i8", 3, Pop1, Push0, MintOpBranch) +OPDEF(MINT_BRFALSE_R4, "brfalse.r4", 3, Pop1, Push0, MintOpBranch) +OPDEF(MINT_BRFALSE_R8, "brfalse.r8", 3, Pop1, Push0, MintOpBranch) +OPDEF(MINT_BRTRUE_I4, "brtrue.i4", 3, Pop1, Push0, MintOpBranch) +OPDEF(MINT_BRTRUE_I8, "brtrue.i8", 3, Pop1, Push0, MintOpBranch) +OPDEF(MINT_BRTRUE_R4, "brtrue.r4", 3, Pop1, Push0, MintOpBranch) +OPDEF(MINT_BRTRUE_R8, "brtrue.r8", 3, Pop1, Push0, MintOpBranch) + +OPDEF(MINT_BRFALSE_I4_S, "brfalse.i4.s", 2, Pop1, Push0, MintOpShortBranch) +OPDEF(MINT_BRFALSE_I8_S, "brfalse.i8.s", 2, Pop1, Push0, MintOpShortBranch) +OPDEF(MINT_BRFALSE_R4_S, "brfalse.r4.s", 2, Pop1, Push0, MintOpShortBranch) +OPDEF(MINT_BRFALSE_R8_S, "brfalse.r8.s", 2, Pop1, Push0, MintOpShortBranch) +OPDEF(MINT_BRTRUE_I4_S, "brtrue.i4.s", 2, Pop1, Push0, MintOpShortBranch) +OPDEF(MINT_BRTRUE_I8_S, "brtrue.i8.s", 2, Pop1, Push0, MintOpShortBranch) +OPDEF(MINT_BRTRUE_R4_S, "brtrue.r4.s", 2, Pop1, Push0, MintOpShortBranch) +OPDEF(MINT_BRTRUE_R8_S, "brtrue.r8.s", 2, Pop1, Push0, MintOpShortBranch) + +OPDEF(MINT_BEQ_I4, "beq.i4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BEQ_I8, "beq.i8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BEQ_R4, "beq.r4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BEQ_R8, "beq.r8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGE_I4, "bge.i4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGE_I8, "bge.i8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGE_R4, "bge.r4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGE_R8, "bge.r8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGT_I4, "bgt.i4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGT_I8, "bgt.i8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGT_R4, "bgt.r4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGT_R8, "bgt.r8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLT_I4, "blt.i4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLT_I8, "blt.i8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLT_R4, "blt.r4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLT_R8, "blt.r8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLE_I4, "ble.i4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLE_I8, "ble.i8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLE_R4, "ble.r4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLE_R8, "ble.r8", 3, Pop2, Push0, MintOpBranch) + +OPDEF(MINT_BNE_UN_I4, "bne.un.i4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BNE_UN_I8, "bne.un.i8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BNE_UN_R4, "bne.un.r4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BNE_UN_R8, "bne.un.r8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGE_UN_I4, "bge.un.i4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGE_UN_I8, "bge.un.i8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGE_UN_R4, "bge.un.r4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGE_UN_R8, "bge.un.r8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGT_UN_I4, "bgt.un.i4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGT_UN_I8, "bgt.un.i8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGT_UN_R4, "bgt.un.r4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BGT_UN_R8, "bgt.un.r8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLE_UN_I4, "ble.un.i4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLE_UN_I8, "ble.un.i8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLE_UN_R4, "ble.un.r4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLE_UN_R8, "ble.un.r8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLT_UN_I4, "blt.un.i4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLT_UN_I8, "blt.un.i8", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLT_UN_R4, "blt.un.r4", 3, Pop2, Push0, MintOpBranch) +OPDEF(MINT_BLT_UN_R8, "blt.un.r8", 3, Pop2, Push0, MintOpBranch) + +OPDEF(MINT_BEQ_I4_S, "beq.i4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BEQ_I8_S, "beq.i8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BEQ_R4_S, "beq.r4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BEQ_R8_S, "beq.r8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGE_I4_S, "bge.i4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGE_I8_S, "bge.i8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGE_R4_S, "bge.r4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGE_R8_S, "bge.r8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGT_I4_S, "bgt.i4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGT_I8_S, "bgt.i8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGT_R4_S, "bgt.r4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGT_R8_S, "bgt.r8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLT_I4_S, "blt.i4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLT_I8_S, "blt.i8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLT_R4_S, "blt.r4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLT_R8_S, "blt.r8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLE_I4_S, "ble.i4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLE_I8_S, "ble.i8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLE_R4_S, "ble.r4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLE_R8_S, "ble.r8.s", 2, Pop2, Push0, MintOpShortBranch) + +OPDEF(MINT_BNE_UN_I4_S, "bne.un.i4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BNE_UN_I8_S, "bne.un.i8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BNE_UN_R4_S, "bne.un.r4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BNE_UN_R8_S, "bne.un.r8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGE_UN_I4_S, "bge.un.i4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGE_UN_I8_S, "bge.un.i8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGE_UN_R4_S, "bge.un.r4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGE_UN_R8_S, "bge.un.r8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGT_UN_I4_S, "bgt.un.i4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGT_UN_I8_S, "bgt.un.i8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGT_UN_R4_S, "bgt.un.r4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BGT_UN_R8_S, "bgt.un.r8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLE_UN_I4_S, "ble.un.i4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLE_UN_I8_S, "ble.un.i8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLE_UN_R4_S, "ble.un.r4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLE_UN_R8_S, "ble.un.r8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLT_UN_I4_S, "blt.un.i4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLT_UN_I8_S, "blt.un.i8.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLT_UN_R4_S, "blt.un.r4.s", 2, Pop2, Push0, MintOpShortBranch) +OPDEF(MINT_BLT_UN_R8_S, "blt.un.r8.s", 2, Pop2, Push0, MintOpShortBranch) + +OPDEF(MINT_SWITCH, "switch", 0, Pop1, Push0, MintOpSwitch) + +OPDEF(MINT_LDSTR, "ldstr", 2, Pop0, Push1, MintOpMethodToken) /* not really */ +OPDEF(MINT_LDSTR_TOKEN, "ldstr.token", 2, Pop0, Push1, MintOpMethodToken) /* not really */ + +OPDEF(MINT_CALL, "call", 2, VarPop, Push1, MintOpMethodToken) +OPDEF(MINT_VCALL, "vcall", 2, VarPop, Push0, MintOpMethodToken) +OPDEF(MINT_CALLVIRT, "callvirt", 2, VarPop, Push1, MintOpMethodToken) +OPDEF(MINT_VCALLVIRT, "vcallvirt", 2, VarPop, Push0, MintOpMethodToken) +OPDEF(MINT_CALLVIRT_FAST, "callvirt.fast", 3, VarPop, Push1, MintOpMethodToken) +OPDEF(MINT_VCALLVIRT_FAST, "vcallvirt.fast", 3, VarPop, Push0, MintOpMethodToken) +OPDEF(MINT_CALLI, "calli", 2, VarPop, VarPush, MintOpMethodToken) +OPDEF(MINT_CALLI_NAT, "calli.nat", 3, VarPop, VarPush, MintOpMethodToken) +OPDEF(MINT_CALLI_NAT_FAST, "calli.nat.fast", 4, VarPop, VarPush, MintOpMethodToken) +OPDEF(MINT_CALL_VARARG, "call.vararg", 3, VarPop, VarPush, MintOpMethodToken) +OPDEF(MINT_JMP, "jmp", 2, Pop0, Push0, MintOpMethodToken) + +OPDEF(MINT_CALLRUN, "callrun", 3, VarPop, VarPush, MintOpNoArgs) + +OPDEF(MINT_ENDFILTER, "endfilter", 1, Pop0, Push0, MintOpNoArgs) + +OPDEF(MINT_NEWOBJ, "newobj", 2, VarPop, Push1, MintOpMethodToken) +OPDEF(MINT_NEWOBJ_ARRAY, "newobj_array", 3, VarPop, Push1, MintOpMethodToken) +OPDEF(MINT_NEWOBJ_FAST, "newobj_fast", 4, VarPop, Push1, MintOpMethodToken) +OPDEF(MINT_NEWOBJ_VT_FAST, "newobj_vt_fast", 3, VarPop, Push1, MintOpMethodToken) +OPDEF(MINT_NEWOBJ_VTST_FAST, "newobj_vtst_fast", 4, VarPop, Push1, MintOpMethodToken) +OPDEF(MINT_NEWOBJ_MAGIC, "newobj_magic", 2, Pop0, Push0, MintOpMethodToken) +OPDEF(MINT_INITOBJ, "initobj", 3, Pop1, Push0, MintOpInt) +OPDEF(MINT_CASTCLASS, "castclass", 2, Pop1, Push1, MintOpClassToken) +OPDEF(MINT_ISINST, "isinst", 2, Pop1, Push1, MintOpClassToken) +OPDEF(MINT_CASTCLASS_INTERFACE, "castclass.interface", 2, Pop1, Push1, MintOpClassToken) +OPDEF(MINT_ISINST_INTERFACE, "isinst.interface", 2, Pop1, Push1, MintOpClassToken) +OPDEF(MINT_CASTCLASS_COMMON, "castclass.common", 2, Pop1, Push1, MintOpClassToken) +OPDEF(MINT_ISINST_COMMON, "isinst.common", 2, Pop1, Push1, MintOpClassToken) +OPDEF(MINT_NEWARR, "newarr", 2, Pop1, Push1, MintOpClassToken) +OPDEF(MINT_BOX, "box", 3, VarPop, VarPush, MintOpTwoShorts) +OPDEF(MINT_BOX_VT, "box.vt", 3, VarPop, VarPush, MintOpTwoShorts) +OPDEF(MINT_BOX_NULLABLE, "box.nullable", 3, VarPop, VarPush, MintOpTwoShorts) +OPDEF(MINT_UNBOX, "unbox", 2, Pop1, Push1, MintOpClassToken) +OPDEF(MINT_LDTOKEN, "ldtoken", 2, Pop0, Push1, MintOpClassToken) /* not really */ +OPDEF(MINT_LDFTN, "ldftn", 2, Pop0, Push1, MintOpMethodToken) +OPDEF(MINT_LDFTN_DYNAMIC, "ldftn.dynamic", 1, Pop1, Push1, MintOpMethodToken) +OPDEF(MINT_LDVIRTFTN, "ldvirtftn", 2, Pop1, Push1, MintOpMethodToken) +OPDEF(MINT_CPOBJ, "cpobj", 2, Pop2, Push0, MintOpClassToken) +OPDEF(MINT_CPOBJ_VT, "cpobj.vt", 2, Pop2, Push0, MintOpClassToken) +OPDEF(MINT_LDOBJ_VT, "ldobj.vt", 3, Pop1, Push1, MintOpInt) +OPDEF(MINT_STOBJ_VT, "stobj.vt", 2, Pop2, Push0, MintOpClassToken) +OPDEF(MINT_CPBLK, "cpblk", 1, Pop3, Push0, MintOpNoArgs) +OPDEF(MINT_INITBLK, "initblk", 1, Pop3, Push0, MintOpNoArgs) +OPDEF(MINT_LOCALLOC, "localloc", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_INITLOCALS, "initlocals", 1, Pop0, Push0, MintOpNoArgs) + +OPDEF(MINT_LDELEM_I, "ldelem.i", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_LDELEM_I1, "ldelem.i1", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_LDELEM_U1, "ldelem.u1", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_LDELEM_I2, "ldelem.i2", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_LDELEM_U2, "ldelem.u2", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_LDELEM_I4, "ldelem.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_LDELEM_U4, "ldelem.u4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_LDELEM_I8, "ldelem.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_LDELEM_R4, "ldelem.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_LDELEM_R8, "ldelem.r8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_LDELEM_REF, "ldelem.ref", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_LDELEM_VT, "ldelem.vt", 3, Pop2, Push1, MintOpInt) + +OPDEF(MINT_LDELEMA, "ldelema", 3, VarPop, Push1, MintOpTwoShorts) +OPDEF(MINT_LDELEMA_TC, "ldelema.tc", 3, VarPop, Push1, MintOpTwoShorts) +OPDEF(MINT_LDELEMA_FAST, "ldelema.fast", 3, Pop2, Push1, MintOpInt) + +OPDEF(MINT_STELEM_I, "stelem.i", 1, Pop3, Push0, MintOpNoArgs) +OPDEF(MINT_STELEM_I1, "stelem.i1", 1, Pop3, Push0, MintOpNoArgs) +OPDEF(MINT_STELEM_U1, "stelem.u1", 1, Pop3, Push0, MintOpNoArgs) +OPDEF(MINT_STELEM_I2, "stelem.i2", 1, Pop3, Push0, MintOpNoArgs) +OPDEF(MINT_STELEM_U2, "stelem.u2", 1, Pop3, Push0, MintOpNoArgs) +OPDEF(MINT_STELEM_I4, "stelem.i4", 1, Pop3, Push0, MintOpNoArgs) +OPDEF(MINT_STELEM_I8, "stelem.i8", 1, Pop3, Push0, MintOpNoArgs) +OPDEF(MINT_STELEM_R4, "stelem.r4", 1, Pop3, Push0, MintOpNoArgs) +OPDEF(MINT_STELEM_R8, "stelem.r8", 1, Pop3, Push0, MintOpNoArgs) +OPDEF(MINT_STELEM_REF, "stelem.ref", 1, Pop3, Push0, MintOpNoArgs) +OPDEF(MINT_STELEM_VT, "stelem.vt", 4, Pop3, Push0, MintOpShortAndInt) + +OPDEF(MINT_LDLEN, "ldlen", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_LDLEN_SPAN, "ldlen.span", 2, Pop1, Push1, MintOpShortInt) + +OPDEF(MINT_GETITEM_SPAN, "getitem.span", 4, Pop2, Push1, MintOpShortAndInt) + +OPDEF(MINT_ADD_I4, "add.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_ADD_I8, "add.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_ADD_R4, "add.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_ADD_R8, "add.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_ADD1_I4, "add1.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_ADD1_I8, "add1.i8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_SUB_I4, "sub.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_SUB_I8, "sub.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_SUB_R4, "sub.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_SUB_R8, "sub.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_SUB1_I4, "sub1.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_SUB1_I8, "sub1.i8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_MUL_I4, "mul.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_MUL_I8, "mul.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_MUL_R4, "mul.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_MUL_R8, "mul.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_DIV_I4, "div.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_DIV_I8, "div.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_DIV_R4, "div.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_DIV_R8, "div.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_DIV_UN_I4, "div.un.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_DIV_UN_I8, "div.un.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_ADD_OVF_I4, "add.ovf.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_ADD_OVF_I8, "add.ovf.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_ADD_OVF_UN_I4, "add.ovf.un.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_ADD_OVF_UN_I8, "add.ovf.un.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_MUL_OVF_I4, "mul.ovf.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_MUL_OVF_I8, "mul.ovf.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_MUL_OVF_UN_I4, "mul.ovf.un.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_MUL_OVF_UN_I8, "mul.ovf.un.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_SUB_OVF_I4, "sub.ovf.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_SUB_OVF_I8, "sub.ovf.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_SUB_OVF_UN_I4, "sub.ovf.un.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_SUB_OVF_UN_I8, "sub.ovf.un.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_NEG_I4, "neg.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_NEG_I8, "neg.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_NEG_R4, "neg.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_NEG_R8, "neg.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_NOT_I4, "not.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_NOT_I8, "not.i8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_AND_I4, "and.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_AND_I8, "and.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_OR_I4, "or.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_OR_I8, "or.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_XOR_I4, "xor.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_XOR_I8, "xor.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_REM_I4, "rem.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_REM_I8, "rem.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_REM_R4, "rem.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_REM_R8, "rem.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_REM_UN_I4, "rem.un.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_REM_UN_I8, "rem.un.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_SHR_UN_I4, "shr.un.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_SHR_UN_I8, "shr.un.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_SHL_I4, "shl.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_SHL_I8, "shl.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_SHR_I4, "shr.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_SHR_I8, "shr.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_R_UN_I4, "conv.r.un.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_R_UN_I8, "conv.r.un.i8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_I1_I4, "conv.i1.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_I1_I8, "conv.i1.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_I1_R4, "conv.i1.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_I1_R8, "conv.i1.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_U1_I4, "conv.u1.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_U1_I8, "conv.u1.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_U1_R4, "conv.u1.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_U1_R8, "conv.u1.r8", 1, Pop1, Push1, MintOpNoArgs) -OPDEF(MINT_CONV_I2_I4, "conv.i2.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_I2_I8, "conv.i2.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_I2_R4, "conv.i2.r4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_I2_R8, "conv.i2.r8", 1, MintOpNoArgs) +OPDEF(MINT_CONV_I2_I4, "conv.i2.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_I2_I8, "conv.i2.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_I2_R4, "conv.i2.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_I2_R8, "conv.i2.r8", 1, Pop1, Push1, MintOpNoArgs) -OPDEF(MINT_CONV_U2_I4, "conv.u2.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_U2_I8, "conv.u2.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_U2_R4, "conv.u2.r4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_U2_R8, "conv.u2.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_I4_I8, "conv.i4.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_I4_R4, "conv.i4.r4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_I4_R8, "conv.i4.r8", 1, MintOpNoArgs) +OPDEF(MINT_CONV_U2_I4, "conv.u2.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_U2_I8, "conv.u2.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_U2_R4, "conv.u2.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_U2_R8, "conv.u2.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_I4_I8, "conv.i4.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_I4_R4, "conv.i4.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_I4_R8, "conv.i4.r8", 1, Pop1, Push1, MintOpNoArgs) -OPDEF(MINT_CONV_U4_I8, "conv.u4.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_U4_R4, "conv.u4.r4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_U4_R8, "conv.u4.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_I8_I4, "conv.i8.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_I8_U4, "conv.i8.u4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_I8_R4, "conv.i8.r4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_I8_R8, "conv.i8.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_R4_I4, "conv.r4.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_R4_I8, "conv.r4.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_R4_R8, "conv.r4.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_R8_I4, "conv.r8.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_R8_I8, "conv.r8.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_R8_R4, "conv.r8.r4", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_I4_I8_SP, "conv.i4.i8.sp", 1, MintOpNoArgs) /* special for narrowing sp[-2] on 64 bits */ -OPDEF(MINT_CONV_I8_I4_SP, "conv.i8.i4.sp", 1, MintOpNoArgs) /* special for widening sp[-2] on 64 bits */ -OPDEF(MINT_CONV_R8_R4_SP, "conv.r8.r4.sp", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_U8_I4, "conv.u8.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_U8_R4, "conv.u8.r4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_U8_R8, "conv.u8.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_OVF_I1_I4, "conv.ovf.i1.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I1_I8, "conv.ovf.i1.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I1_R8, "conv.ovf.i1.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_OVF_I1_U4, "conv.ovf.i1.u4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I1_U8, "conv.ovf.i1.u8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I1_UN_R8, "conv.ovf.i1.un.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_OVF_U1_I4, "conv.ovf.u1.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_U1_I8, "conv.ovf.u1.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_U1_R8, "conv.ovf.u1.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_OVF_I2_I4, "conv.ovf.i2.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I2_I8, "conv.ovf.i2.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I2_R8, "conv.ovf.i2.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_OVF_I2_U4, "conv.ovf.i2.u4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I2_U8, "conv.ovf.i2.u8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I2_UN_R8, "conv.ovf.i2.un.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_OVF_U2_I4, "conv.ovf.u2.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_U2_I8, "conv.ovf.u2.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_U2_R8, "conv.ovf.u2.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_OVF_I4_U4, "conv.ovf.i4.u4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I4_I8, "conv.ovf.i4.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I4_U8, "conv.ovf.i4.u8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I4_R4, "conv.ovf.i4.r4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I4_R8, "conv.ovf.i4.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_OVF_I4_UN_I8, "conv.ovf.i4.un.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I4_UN_R8, "conv.ovf.i4.un.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_OVF_U4_I4, "conv.ovf.u4.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_U4_I8, "conv.ovf.u4.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_U4_R4, "conv.ovf.u4.r4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_U4_R8, "conv.ovf.u4.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_OVF_I8_U8, "conv.ovf.i8.u8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I8_R4, "conv.ovf.i8.r4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I8_R8, "conv.ovf.i8.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_OVF_I8_UN_R8, "conv.ovf.i8.un.r8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_I8_UN_R4, "conv.ovf.i8.un.r4", 1, MintOpNoArgs) - -OPDEF(MINT_CONV_OVF_U8_I4, "conv.ovf.u8.i4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_U8_I8, "conv.ovf.u8.i8", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_U8_R4, "conv.ovf.u8.r4", 1, MintOpNoArgs) -OPDEF(MINT_CONV_OVF_U8_R8, "conv.ovf.u8.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CEQ_I4, "ceq.i4", 1, MintOpNoArgs) -OPDEF(MINT_CEQ_I8, "ceq.i8", 1, MintOpNoArgs) -OPDEF(MINT_CEQ_R4, "ceq.r4", 1, MintOpNoArgs) -OPDEF(MINT_CEQ_R8, "ceq.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CNE_I4, "cne.i4", 1, MintOpNoArgs) -OPDEF(MINT_CNE_I8, "cne.i8", 1, MintOpNoArgs) -OPDEF(MINT_CNE_R4, "cne.r4", 1, MintOpNoArgs) -OPDEF(MINT_CNE_R8, "cne.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CEQ0_I4, "ceq0.i4", 1, MintOpNoArgs) - -OPDEF(MINT_CGT_I4, "cgt.i4", 1, MintOpNoArgs) -OPDEF(MINT_CGT_I8, "cgt.i8", 1, MintOpNoArgs) -OPDEF(MINT_CGT_R4, "cgt.r4", 1, MintOpNoArgs) -OPDEF(MINT_CGT_R8, "cgt.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CGE_I4, "cge.i4", 1, MintOpNoArgs) -OPDEF(MINT_CGE_I8, "cge.i8", 1, MintOpNoArgs) -OPDEF(MINT_CGE_R4, "cge.r4", 1, MintOpNoArgs) -OPDEF(MINT_CGE_R8, "cge.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CGE_UN_I4, "cge.un.i4", 1, MintOpNoArgs) -OPDEF(MINT_CGE_UN_I8, "cge.un.i8", 1, MintOpNoArgs) - -OPDEF(MINT_CGT_UN_I4, "cgt.un.i4", 1, MintOpNoArgs) -OPDEF(MINT_CGT_UN_I8, "cgt.un.i8", 1, MintOpNoArgs) -OPDEF(MINT_CGT_UN_R4, "cgt.un.r4", 1, MintOpNoArgs) -OPDEF(MINT_CGT_UN_R8, "cgt.un.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CLT_I4, "clt.i4", 1, MintOpNoArgs) -OPDEF(MINT_CLT_I8, "clt.i8", 1, MintOpNoArgs) -OPDEF(MINT_CLT_R4, "clt.r4", 1, MintOpNoArgs) -OPDEF(MINT_CLT_R8, "clt.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CLE_I4, "cle.i4", 1, MintOpNoArgs) -OPDEF(MINT_CLE_I8, "cle.i8", 1, MintOpNoArgs) -OPDEF(MINT_CLE_R4, "cle.r4", 1, MintOpNoArgs) -OPDEF(MINT_CLE_R8, "cle.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CLE_UN_I4, "cle.un.i4", 1, MintOpNoArgs) -OPDEF(MINT_CLE_UN_I8, "cle.un.i8", 1, MintOpNoArgs) - -OPDEF(MINT_CLT_UN_I4, "clt.un.i4", 1, MintOpNoArgs) -OPDEF(MINT_CLT_UN_I8, "clt.un.i8", 1, MintOpNoArgs) -OPDEF(MINT_CLT_UN_R4, "clt.un.r4", 1, MintOpNoArgs) -OPDEF(MINT_CLT_UN_R8, "clt.un.r8", 1, MintOpNoArgs) - -OPDEF(MINT_CKFINITE, "ckfinite", 1, MintOpNoArgs) -OPDEF(MINT_MKREFANY, "mkrefany", 2, MintOpClassToken) -OPDEF(MINT_REFANYTYPE, "refanytype", 1, MintOpNoArgs) -OPDEF(MINT_REFANYVAL, "refanyval", 2, MintOpNoArgs) - -OPDEF(MINT_CKNULL_N, "cknull_n", 2, MintOpUShortInt) - -OPDEF(MINT_GETCHR, "getchr", 1, MintOpNoArgs) -OPDEF(MINT_STRLEN, "strlen", 1, MintOpNoArgs) -OPDEF(MINT_ARRAY_RANK, "array_rank", 1, MintOpNoArgs) - -OPDEF(MINT_ICALL_V_V, "mono_icall_v_v", 2, MintOpClassToken) /* not really */ -OPDEF(MINT_ICALL_V_P, "mono_icall_v_p", 2, MintOpClassToken) -OPDEF(MINT_ICALL_P_V, "mono_icall_p_v", 2, MintOpClassToken) -OPDEF(MINT_ICALL_P_P, "mono_icall_p_p", 2, MintOpClassToken) -OPDEF(MINT_ICALL_PP_V, "mono_icall_pp_v", 2, MintOpClassToken) -OPDEF(MINT_ICALL_PP_P, "mono_icall_pp_p", 2, MintOpClassToken) -OPDEF(MINT_ICALL_PPP_V, "mono_icall_ppp_v", 2, MintOpClassToken) -OPDEF(MINT_ICALL_PPP_P, "mono_icall_ppp_p", 2, MintOpClassToken) -OPDEF(MINT_ICALL_PPPP_V, "mono_icall_pppp_v", 2, MintOpClassToken) -OPDEF(MINT_ICALL_PPPP_P, "mono_icall_pppp_p", 2, MintOpClassToken) -OPDEF(MINT_ICALL_PPPPP_V, "mono_icall_ppppp_v", 2, MintOpClassToken) -OPDEF(MINT_ICALL_PPPPP_P, "mono_icall_ppppp_p", 2, MintOpClassToken) -OPDEF(MINT_ICALL_PPPPPP_V, "mono_icall_pppppp_v", 2, MintOpClassToken) -OPDEF(MINT_ICALL_PPPPPP_P, "mono_icall_pppppp_p", 2, MintOpClassToken) -OPDEF(MINT_MONO_LDPTR, "mono_ldptr", 2, MintOpClassToken) -OPDEF(MINT_MONO_SGEN_THREAD_INFO, "mono_sgen_thread_info", 1, MintOpNoArgs) -OPDEF(MINT_MONO_NEWOBJ, "mono_newobj", 2, MintOpClassToken) -OPDEF(MINT_MONO_RETOBJ, "mono_retobj", 1, MintOpNoArgs) -OPDEF(MINT_MONO_FREE, "mono_free", 1, MintOpNoArgs) -OPDEF(MINT_MONO_ATOMIC_STORE_I4, "mono_atomic.store.i4", 1, MintOpNoArgs) -OPDEF(MINT_MONO_MEMORY_BARRIER, "mono_memory_barrier", 1, MintOpNoArgs) -OPDEF(MINT_MONO_LDDOMAIN, "mono_lddomain", 1, MintOpNoArgs) +OPDEF(MINT_CONV_U4_I8, "conv.u4.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_U4_R4, "conv.u4.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_U4_R8, "conv.u4.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_I8_I4, "conv.i8.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_I8_U4, "conv.i8.u4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_I8_R4, "conv.i8.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_I8_R8, "conv.i8.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_R4_I4, "conv.r4.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_R4_I8, "conv.r4.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_R4_R8, "conv.r4.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_R8_I4, "conv.r8.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_R8_I8, "conv.r8.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_R8_R4, "conv.r8.r4", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_I4_I8_SP, "conv.i4.i8.sp", 1, Pop1, Push1, MintOpNoArgs) /* special for narrowing sp[-2] on 64 bits */ +OPDEF(MINT_CONV_I8_I4_SP, "conv.i8.i4.sp", 1, Pop1, Push1, MintOpNoArgs) /* special for widening sp[-2] on 64 bits */ +OPDEF(MINT_CONV_R8_R4_SP, "conv.r8.r4.sp", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_U8_I4, "conv.u8.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_U8_R4, "conv.u8.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_U8_R8, "conv.u8.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_OVF_I1_I4, "conv.ovf.i1.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I1_I8, "conv.ovf.i1.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I1_R8, "conv.ovf.i1.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_OVF_I1_U4, "conv.ovf.i1.u4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I1_U8, "conv.ovf.i1.u8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I1_UN_R8, "conv.ovf.i1.un.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_OVF_U1_I4, "conv.ovf.u1.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_U1_I8, "conv.ovf.u1.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_U1_R8, "conv.ovf.u1.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_OVF_I2_I4, "conv.ovf.i2.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I2_I8, "conv.ovf.i2.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I2_R8, "conv.ovf.i2.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_OVF_I2_U4, "conv.ovf.i2.u4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I2_U8, "conv.ovf.i2.u8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I2_UN_R8, "conv.ovf.i2.un.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_OVF_U2_I4, "conv.ovf.u2.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_U2_I8, "conv.ovf.u2.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_U2_R8, "conv.ovf.u2.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_OVF_I4_U4, "conv.ovf.i4.u4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I4_I8, "conv.ovf.i4.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I4_U8, "conv.ovf.i4.u8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I4_R4, "conv.ovf.i4.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I4_R8, "conv.ovf.i4.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_OVF_I4_UN_I8, "conv.ovf.i4.un.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I4_UN_R8, "conv.ovf.i4.un.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_OVF_U4_I4, "conv.ovf.u4.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_U4_I8, "conv.ovf.u4.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_U4_R4, "conv.ovf.u4.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_U4_R8, "conv.ovf.u4.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_OVF_I8_U8, "conv.ovf.i8.u8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I8_R4, "conv.ovf.i8.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I8_R8, "conv.ovf.i8.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_OVF_I8_UN_R8, "conv.ovf.i8.un.r8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_I8_UN_R4, "conv.ovf.i8.un.r4", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CONV_OVF_U8_I4, "conv.ovf.u8.i4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_U8_I8, "conv.ovf.u8.i8", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_U8_R4, "conv.ovf.u8.r4", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CONV_OVF_U8_R8, "conv.ovf.u8.r8", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CEQ_I4, "ceq.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CEQ_I8, "ceq.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CEQ_R4, "ceq.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CEQ_R8, "ceq.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_CNE_I4, "cne.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CNE_I8, "cne.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CNE_R4, "cne.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CNE_R8, "cne.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_CEQ0_I4, "ceq0.i4", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CGT_I4, "cgt.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CGT_I8, "cgt.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CGT_R4, "cgt.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CGT_R8, "cgt.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_CGE_I4, "cge.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CGE_I8, "cge.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CGE_R4, "cge.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CGE_R8, "cge.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_CGE_UN_I4, "cge.un.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CGE_UN_I8, "cge.un.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_CGT_UN_I4, "cgt.un.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CGT_UN_I8, "cgt.un.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CGT_UN_R4, "cgt.un.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CGT_UN_R8, "cgt.un.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_CLT_I4, "clt.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CLT_I8, "clt.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CLT_R4, "clt.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CLT_R8, "clt.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_CLE_I4, "cle.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CLE_I8, "cle.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CLE_R4, "cle.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CLE_R8, "cle.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_CLE_UN_I4, "cle.un.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CLE_UN_I8, "cle.un.i8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_CLT_UN_I4, "clt.un.i4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CLT_UN_I8, "clt.un.i8", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CLT_UN_R4, "clt.un.r4", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_CLT_UN_R8, "clt.un.r8", 1, Pop2, Push1, MintOpNoArgs) + +OPDEF(MINT_CKFINITE, "ckfinite", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_MKREFANY, "mkrefany", 2, Pop1, Push1, MintOpClassToken) +OPDEF(MINT_REFANYTYPE, "refanytype", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_REFANYVAL, "refanyval", 2, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_CKNULL_N, "cknull_n", 2, VarPop, VarPush, MintOpUShortInt) + +OPDEF(MINT_GETCHR, "getchr", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_STRLEN, "strlen", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_ARRAY_RANK, "array_rank", 1, Pop1, Push1, MintOpNoArgs) + +OPDEF(MINT_ICALL_V_V, "mono_icall_v_v", 2, Pop0, Push0, MintOpClassToken) /* not really */ +OPDEF(MINT_ICALL_V_P, "mono_icall_v_p", 2, Pop0, Push1, MintOpClassToken) +OPDEF(MINT_ICALL_P_V, "mono_icall_p_v", 2, Pop1, Push0, MintOpClassToken) +OPDEF(MINT_ICALL_P_P, "mono_icall_p_p", 2, Pop1, Push1, MintOpClassToken) +OPDEF(MINT_ICALL_PP_V, "mono_icall_pp_v", 2, Pop2, Push0, MintOpClassToken) +OPDEF(MINT_ICALL_PP_P, "mono_icall_pp_p", 2, Pop2, Push1, MintOpClassToken) +OPDEF(MINT_ICALL_PPP_V, "mono_icall_ppp_v", 2, Pop3, Push0, MintOpClassToken) +OPDEF(MINT_ICALL_PPP_P, "mono_icall_ppp_p", 2, Pop3, Push1, MintOpClassToken) +OPDEF(MINT_ICALL_PPPP_V, "mono_icall_pppp_v", 2, Pop4, Push0, MintOpClassToken) +OPDEF(MINT_ICALL_PPPP_P, "mono_icall_pppp_p", 2, Pop4, Push1, MintOpClassToken) +OPDEF(MINT_ICALL_PPPPP_V, "mono_icall_ppppp_v", 2, Pop5, Push0, MintOpClassToken) +OPDEF(MINT_ICALL_PPPPP_P, "mono_icall_ppppp_p", 2, Pop5, Push1, MintOpClassToken) +OPDEF(MINT_ICALL_PPPPPP_V, "mono_icall_pppppp_v", 2, Pop6, Push0, MintOpClassToken) +OPDEF(MINT_ICALL_PPPPPP_P, "mono_icall_pppppp_p", 2, Pop6, Push1, MintOpClassToken) +OPDEF(MINT_MONO_LDPTR, "mono_ldptr", 2, Pop0, Push1, MintOpClassToken) +OPDEF(MINT_MONO_SGEN_THREAD_INFO, "mono_sgen_thread_info", 1, Pop0, Push1, MintOpNoArgs) +OPDEF(MINT_MONO_NEWOBJ, "mono_newobj", 2, Pop0, Push1, MintOpClassToken) +OPDEF(MINT_MONO_RETOBJ, "mono_retobj", 1, Pop1, Push0, MintOpNoArgs) +OPDEF(MINT_MONO_ATOMIC_STORE_I4, "mono_atomic.store.i4", 1, Pop2, Push0, MintOpNoArgs) +OPDEF(MINT_MONO_MEMORY_BARRIER, "mono_memory_barrier", 1, Pop0, Push0, MintOpNoArgs) +OPDEF(MINT_MONO_LDDOMAIN, "mono_lddomain", 1, Pop0, Push1, MintOpNoArgs) // FIXME: MintOp -OPDEF(MINT_JIT_CALL, "mono_jit_call", 2, MintOpNoArgs) -OPDEF(MINT_SDB_INTR_LOC, "sdb_intr_loc", 1, MintOpNoArgs) -OPDEF(MINT_SDB_SEQ_POINT, "sdb_seq_point", 1, MintOpNoArgs) -OPDEF(MINT_SDB_BREAKPOINT, "sdb_breakpoint", 1, MintOpNoArgs) -OPDEF(MINT_LD_DELEGATE_METHOD_PTR, "ld_delegate_method_ptr", 1, MintOpNoArgs) -OPDEF(MINT_LD_DELEGATE_INVOKE_IMPL, "ld_delegate_invoke_impl", 2, MintOpNoArgs) +OPDEF(MINT_JIT_CALL, "mono_jit_call", 2, VarPop, VarPush, MintOpNoArgs) +OPDEF(MINT_SDB_INTR_LOC, "sdb_intr_loc", 1, Pop0, Push0, MintOpNoArgs) +OPDEF(MINT_SDB_SEQ_POINT, "sdb_seq_point", 1, Pop0, Push0, MintOpNoArgs) +OPDEF(MINT_SDB_BREAKPOINT, "sdb_breakpoint", 1, Pop0, Push0, MintOpNoArgs) +OPDEF(MINT_LD_DELEGATE_METHOD_PTR, "ld_delegate_method_ptr", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_LD_DELEGATE_INVOKE_IMPL, "ld_delegate_invoke_impl", 2, VarPop, VarPush, MintOpNoArgs) -OPDEF(MINT_START_ABORT_PROT, "start_abort_protected", 1, MintOpNoArgs) +OPDEF(MINT_START_ABORT_PROT, "start_abort_protected", 1, Pop0, Push0, MintOpNoArgs) // Math intrinsics -OPDEF(MINT_ABS, "abs", 1, MintOpNoArgs) -OPDEF(MINT_ASIN, "asin", 1, MintOpNoArgs) -OPDEF(MINT_ASINH, "asinh", 1, MintOpNoArgs) -OPDEF(MINT_ACOS, "acos", 1, MintOpNoArgs) -OPDEF(MINT_ACOSH, "acosh", 1, MintOpNoArgs) -OPDEF(MINT_ATAN, "atan", 1, MintOpNoArgs) -OPDEF(MINT_ATANH, "atanh", 1, MintOpNoArgs) -OPDEF(MINT_COS, "cos", 1, MintOpNoArgs) -OPDEF(MINT_CBRT, "cbrt", 1, MintOpNoArgs) -OPDEF(MINT_COSH, "cosh", 1, MintOpNoArgs) -OPDEF(MINT_SIN, "sin", 1, MintOpNoArgs) -OPDEF(MINT_SQRT, "sqrt", 1, MintOpNoArgs) -OPDEF(MINT_SINH, "sinh", 1, MintOpNoArgs) -OPDEF(MINT_TAN, "tan", 1, MintOpNoArgs) -OPDEF(MINT_TANH, "tanh", 1, MintOpNoArgs) +OPDEF(MINT_ABS, "abs", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_ASIN, "asin", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_ASINH, "asinh", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_ACOS, "acos", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_ACOSH, "acosh", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_ATAN, "atan", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_ATANH, "atanh", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_COS, "cos", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_CBRT, "cbrt", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_COSH, "cosh", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_SIN, "sin", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_SQRT, "sqrt", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_SINH, "sinh", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_TAN, "tan", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_TANH, "tanh", 1, Pop1, Push1, MintOpNoArgs) /* * This needs to be an opcode because we need to trigger the enter event after * the STINARG* opcodes have executed. */ -OPDEF(MINT_PROF_ENTER, "prof_enter", 1, MintOpNoArgs) -OPDEF(MINT_TRACE_ENTER, "trace_enter", 1, MintOpNoArgs) -OPDEF(MINT_TRACE_EXIT, "trace_exit", 3, MintOpInt) - -OPDEF(MINT_INTRINS_ENUM_HASFLAG, "intrins_enum_hasflag", 2, MintOpClassToken) -OPDEF(MINT_INTRINS_GET_HASHCODE, "intrins_get_hashcode", 1, MintOpNoArgs) -OPDEF(MINT_INTRINS_GET_TYPE, "intrins_get_type", 1, MintOpNoArgs) -OPDEF(MINT_INTRINS_BYREFERENCE_CTOR, "intrins_byreference_ctor", 2, MintOpClassToken) -OPDEF(MINT_INTRINS_BYREFERENCE_GET_VALUE, "intrins_byreference_get_value", 1, MintOpNoArgs) -OPDEF(MINT_INTRINS_UNSAFE_ADD_BYTE_OFFSET, "intrins_unsafe_add_byte_offset", 1, MintOpNoArgs) -OPDEF(MINT_INTRINS_UNSAFE_BYTE_OFFSET, "intrins_unsafe_byte_offset", 1, MintOpNoArgs) -OPDEF(MINT_INTRINS_RUNTIMEHELPERS_OBJECT_HAS_COMPONENT_SIZE, "intrins_runtimehelpers_object_has_component_size", 1, MintOpNoArgs) +OPDEF(MINT_PROF_ENTER, "prof_enter", 1, Pop0, Push0, MintOpNoArgs) +OPDEF(MINT_TRACE_ENTER, "trace_enter", 1, Pop0, Push0, MintOpNoArgs) +OPDEF(MINT_TRACE_EXIT, "trace_exit", 3, Pop0, Push0, MintOpInt) + +OPDEF(MINT_INTRINS_ENUM_HASFLAG, "intrins_enum_hasflag", 2, Pop2, Push1, MintOpClassToken) +OPDEF(MINT_INTRINS_GET_HASHCODE, "intrins_get_hashcode", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_INTRINS_GET_TYPE, "intrins_get_type", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_INTRINS_BYREFERENCE_CTOR, "intrins_byreference_ctor", 2, VarPop, Push1, MintOpClassToken) +OPDEF(MINT_INTRINS_BYREFERENCE_GET_VALUE, "intrins_byreference_get_value", 1, Pop1, Push1, MintOpNoArgs) +OPDEF(MINT_INTRINS_UNSAFE_ADD_BYTE_OFFSET, "intrins_unsafe_add_byte_offset", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_INTRINS_UNSAFE_BYTE_OFFSET, "intrins_unsafe_byte_offset", 1, Pop2, Push1, MintOpNoArgs) +OPDEF(MINT_INTRINS_RUNTIMEHELPERS_OBJECT_HAS_COMPONENT_SIZE, "intrins_runtimehelpers_object_has_component_size", 1, Pop1, Push1, MintOpNoArgs) diff --git a/src/mono/mono/mini/interp/mintops.h b/src/mono/mono/mini/interp/mintops.h index f5793bf..82a7cad 100644 --- a/src/mono/mono/mini/interp/mintops.h +++ b/src/mono/mono/mini/interp/mintops.h @@ -26,7 +26,7 @@ typedef enum MintOpShortAndInt } MintOpArgType; -#define OPDEF(a,b,c,d) a, +#define OPDEF(a,b,c,d,e,f) a, enum { #include "mintops.def" }; @@ -53,9 +53,18 @@ enum { #define MINT_SWITCH_LEN(n) (3 + (n) * 2) +#define MINT_IS_LDLOC(op) ((op) >= MINT_LDLOC_I1 && (op) <= MINT_LDLOC_VT) +#define MINT_IS_STLOC(op) ((op) >= MINT_STLOC_I1 && (op) <= MINT_STLOC_VT) + +#define MINT_POP_ALL -2 +#define MINT_VAR_PUSH -1 +#define MINT_VAR_POP -1 + extern unsigned char const mono_interp_oplen[]; +extern int const mono_interp_oppop[]; +extern int const mono_interp_oppush[]; extern MintOpArgType const mono_interp_opargtype[]; -extern char* mono_interp_dis_mintop(const unsigned short *base, const guint16 *ip); +extern char* mono_interp_dis_mintop (const unsigned short *base, const guint16 *ip); extern const guint16* mono_interp_dis_mintop_len (const guint16 *ip); // This, instead of an array of pointers, to optimize away a pointer and a relocation per string. diff --git a/src/mono/mono/mini/interp/transform.c b/src/mono/mono/mini/interp/transform.c index b735705..bf55289 100644 --- a/src/mono/mono/mini/interp/transform.c +++ b/src/mono/mono/mini/interp/transform.c @@ -49,6 +49,11 @@ typedef struct unsigned char flags; } StackInfo; +typedef struct +{ + InterpInst *ins; +} StackContentInfo; + struct InterpInst { guint16 opcode; InterpInst *next, *prev; @@ -737,18 +742,8 @@ load_local_general (TransformData *td, int offset, MonoType *type) WRITE32_INS (td->last_ins, 1, &size); } else { g_assert (mt < MINT_TYPE_VT); - if (!td->gen_sdb_seq_points && - mt == MINT_TYPE_I4 && !td->is_bb_start [td->in_start - td->il_code] && td->last_ins != NULL && - td->last_ins->opcode == MINT_STLOC_I4 && td->last_ins->data [0] == offset) { - td->last_ins->opcode = MINT_STLOC_NP_I4; - } else if (!td->gen_sdb_seq_points && - mt == MINT_TYPE_O && !td->is_bb_start [td->in_start - td->il_code] && td->last_ins != NULL && - td->last_ins->opcode == MINT_STLOC_O && td->last_ins->data [0] == offset) { - td->last_ins->opcode = MINT_STLOC_NP_O; - } else { - interp_add_ins (td, MINT_LDLOC_I1 + (mt - MINT_TYPE_I1)); - td->last_ins->data [0] = offset; /*FIX for large offset */ - } + interp_add_ins (td, MINT_LDLOC_I1 + (mt - MINT_TYPE_I1)); + td->last_ins->data [0] = offset; /*FIX for large offset */ if (mt == MINT_TYPE_O) klass = mono_class_from_mono_type_internal (type); } @@ -5943,6 +5938,107 @@ get_inst_length (InterpInst *ins) return mono_interp_oplen [ins->opcode]; } +static void +get_inst_stack_usage (TransformData *td, InterpInst *ins, int *pop, int *push) +{ + guint16 opcode = ins->opcode; + if (mono_interp_oppop [opcode] == MINT_VAR_POP || + mono_interp_oppush [opcode] == MINT_VAR_PUSH) { + switch (opcode) { + case MINT_JIT_CALL: + case MINT_CALL: + case MINT_CALLVIRT: + case MINT_CALLVIRT_FAST: + case MINT_VCALL: + case MINT_VCALLVIRT: + case MINT_VCALLVIRT_FAST: { + InterpMethod *imethod = (InterpMethod*) td->data_items [ins->data [0]]; + *pop = imethod->param_count + imethod->hasthis; + if (opcode == MINT_JIT_CALL) + *push = imethod->rtype->type != MONO_TYPE_VOID; + else + *push = opcode == MINT_CALL || opcode == MINT_CALLVIRT || opcode == MINT_CALLVIRT_FAST; + break; + } + case MINT_CALLRUN: { + MonoMethodSignature *csignature = (MonoMethodSignature*) td->data_items [ins->data [1]]; + *pop = csignature->param_count + csignature->hasthis; + *push = csignature->ret->type != MONO_TYPE_VOID; + break; + } + case MINT_CALLI: + case MINT_CALLI_NAT: + case MINT_CALLI_NAT_FAST: { + MonoMethodSignature *csignature = (MonoMethodSignature*) td->data_items [ins->data [0]]; + *pop = csignature->param_count + csignature->hasthis + 1; + *push = csignature->ret->type != MONO_TYPE_VOID; + break; + } + case MINT_CALL_VARARG: { + InterpMethod *imethod = (InterpMethod*) td->data_items [ins->data [0]]; + MonoMethodSignature *csignature = (MonoMethodSignature*) td->data_items [ins->data [1]]; + *pop = imethod->param_count + imethod->hasthis + csignature->param_count - csignature->sentinelpos; + *push = imethod->rtype->type != MONO_TYPE_VOID; + break; + } + case MINT_NEWOBJ_FAST: { + int param_count = ins->data [1]; + gboolean is_inlined = ins->data [0] == 0xffff; + if (is_inlined) { + // FIXME + // We lose track of the contents of the stack because the newobj references are pushed below + // the ctor arguments. We should keep track of stack contents to enable ctor optimization. + *pop = param_count; + *push = param_count + 2; + } else { + *pop = param_count; + *push = 1; + } + break; + } + case MINT_NEWOBJ_ARRAY: + case MINT_NEWOBJ_VT_FAST: + case MINT_NEWOBJ_VTST_FAST: + case MINT_LDELEMA: + case MINT_LDELEMA_TC: + *pop = ins->data [1]; + *push = 1; + break; + case MINT_NEWOBJ: { + InterpMethod *imethod = (InterpMethod*) td->data_items [ins->data [0]]; + *pop = imethod->param_count; + *push = 1; + break; + } + case MINT_BOX: + case MINT_BOX_VT: + case MINT_BOX_NULLABLE: + *pop = (ins->data [1] & ~BOX_NOT_CLEAR_VT_SP) + 1; + *push = *pop; + break; + case MINT_CKNULL_N: + *pop = ins->data [0]; + *push = ins->data [0]; + break; + case MINT_LD_DELEGATE_INVOKE_IMPL: + *pop = ins->data [0]; + *push = ins->data [0] + 1; + break; + case MINT_INTRINS_BYREFERENCE_CTOR: { + InterpMethod *imethod = (InterpMethod*) td->data_items [ins->data [0]]; + *pop = imethod->param_count; + *push = 1; + break; + } + default: + g_assert_not_reached (); + } + } else { + *pop = mono_interp_oppop [opcode]; + *push = mono_interp_oppush [opcode]; + } +} + static guint16* emit_compacted_instruction (TransformData *td, guint16* start_ip, InterpInst *ins) { @@ -6078,6 +6174,141 @@ generate_compacted_code (TransformData *td) g_ptr_array_free (td->relocs, TRUE); } +static int +get_movloc_for_type (int mt) +{ + switch (mt) { + case MINT_TYPE_I1: + case MINT_TYPE_U1: + return MINT_MOVLOC_1; + case MINT_TYPE_I2: + case MINT_TYPE_U2: + return MINT_MOVLOC_2; + case MINT_TYPE_I4: + case MINT_TYPE_R4: + return MINT_MOVLOC_4; + case MINT_TYPE_I8: + case MINT_TYPE_R8: + return MINT_MOVLOC_8; + case MINT_TYPE_O: + case MINT_TYPE_P: +#if SIZEOF_VOID_P == 8 + return MINT_MOVLOC_8; +#else + return MINT_MOVLOC_4; +#endif + case MINT_TYPE_VT: + return MINT_MOVLOC_VT; + } + g_assert_not_reached (); +} + +static void +clear_stack_content_info_for_local (StackContentInfo *start, StackContentInfo *end, int local_offset) +{ + StackContentInfo *si; + for (si = start; si < end; si++) { + if (si->ins) { + g_assert (MINT_IS_LDLOC (si->ins->opcode)); + if (si->ins->data [0] == local_offset) + si->ins = NULL; + } + } +} + +static void +interp_cprop (TransformData *td) +{ + if (!td->max_stack_height || !td->total_locals_size) + return; + StackContentInfo *stack = (StackContentInfo*) g_malloc (td->max_stack_height * sizeof (StackContentInfo)); + StackContentInfo *stack_end = stack + td->max_stack_height; + StackContentInfo *sp = stack; + InterpInst *ins; + int last_il_offset = -1; + + for (ins = td->first_ins; ins != NULL; ins = ins->next) { + int pop, push; + int il_offset = ins->il_offset; + // Optimizations take place only inside a single basic block + // If two instructions have the same il_offset, then the second one + // cannot be part the start of a basic block. + gboolean is_bb_start = il_offset != -1 && td->is_bb_start [il_offset] && il_offset != last_il_offset; + if (is_bb_start && td->stack_height [il_offset] >= 0) { + sp = stack + td->stack_height [il_offset]; + g_assert (sp >= stack); + memset (stack, 0, (sp - stack) * sizeof (StackContentInfo)); + } + // The instruction pops some values then pushes some other + get_inst_stack_usage (td, ins, &pop, &push); + if (MINT_IS_LDLOC (ins->opcode)) { + int replace_op = 0; + if (!is_bb_start && MINT_IS_STLOC (ins->prev->opcode) && ins->prev->data [0] == ins->data [0]) { + int mt = ins->prev->opcode - MINT_STLOC_I1; + if (ins->opcode - MINT_LDLOC_I1 == mt) { + if (mt == MINT_TYPE_I4) + replace_op = MINT_STLOC_NP_I4; + else if (mt == MINT_TYPE_O) + replace_op = MINT_STLOC_NP_O; + if (replace_op) { + if (td->verbose_level) + g_print ("Add stloc : ldloc (off %p), stloc (off %p)\n", ins->il_offset, ins->prev->il_offset); + interp_clear_ins (td, ins->prev); + ins->opcode = replace_op; + mono_interp_stats.killed_instructions++; + } + } + } + // Save the ldloc on the stack if it wasn't optimized already + if (!replace_op) + sp->ins = ins; + sp++; + } else if (MINT_IS_STLOC (ins->opcode)) { + sp--; + if (sp->ins != NULL) { + int mt = sp->ins->opcode - MINT_LDLOC_I1; + if (ins->opcode - MINT_STLOC_I1 == mt) { + // Same local, same type of load and store, convert to movloc + if (td->verbose_level) + g_print ("Add movloc : ldloc (off %p), stloc (off %p)\n", sp->ins->il_offset, ins->il_offset); + int src_local = sp->ins->data [0]; + int dest_local = ins->data [0]; + interp_clear_ins (td, sp->ins); + interp_clear_ins (td, ins); + + ins = interp_insert_ins (td, ins, get_movloc_for_type (mt)); + ins->data [0] = src_local; + ins->data [1] = dest_local; + if (ins->opcode == MINT_MOVLOC_VT) + ins->data [2] = sp->ins->data [1]; + mono_interp_stats.killed_instructions++; + } + } + clear_stack_content_info_for_local (stack, sp, ins->data [1]); + } else { + if (ins->opcode == MINT_LDLOCA_S) + clear_stack_content_info_for_local (stack, sp, ins->data [0]); + if (pop == MINT_POP_ALL) + pop = sp - stack; + sp += push - pop; + g_assert (sp >= stack && sp <= stack_end); + g_assert ((sp - push) >= stack && (sp - push) <= stack_end); + memset (sp - push, 0, push * sizeof (StackContentInfo)); + } + // TODO handle dup + last_il_offset = ins->il_offset; + } + + g_free (stack); +} + +static void +interp_optimize_code (TransformData *td) +{ + if (mono_interp_opt & INTERP_OPT_CPROP) + MONO_TIME_TRACK (mono_interp_stats.cprop_time, interp_cprop (td)); +} + static void generate (MonoMethod *method, MonoMethodHeader *header, InterpMethod *rtm, MonoGenericContext *generic_context, MonoError *error) { @@ -6145,6 +6376,8 @@ generate (MonoMethod *method, MonoMethodHeader *header, InterpMethod *rtm, MonoG generate_code (td, method, header, generic_context, error); goto_if_nok (error, exit); + interp_optimize_code (td); + generate_compacted_code (td); if (td->verbose_level) { -- 2.7.4