MINI_OP(OP_LCOMPARE_IMM, "lcompare_imm", NONE, LREG, NONE)
MINI_OP(OP_LOCAL, "local", NONE, NONE, NONE)
MINI_OP(OP_ARG, "arg", NONE, NONE, NONE)
-MINI_OP(OP_ARGLIST, "oparglist", NONE, IREG, NONE)
MINI_OP(OP_OUTARG_VT, "outarg_vt", NONE, VREG, NONE)
MINI_OP(OP_OUTARG_VTRETADDR, "outarg_vtretaddr", IREG, NONE, NONE)
MINI_OP(OP_SETRET, "setret", NONE, IREG, NONE)
MINI_OP(OP_LOCALLOC, "localloc", IREG, IREG, NONE)
MINI_OP(OP_LOCALLOC_IMM, "localloc_imm", IREG, NONE, NONE)
MINI_OP(OP_CHECK_THIS, "checkthis", NONE, IREG, NONE)
+MINI_OP(OP_SEQ_POINT, "seq_point", NONE, NONE, NONE)
+MINI_OP(OP_IMPLICIT_EXCEPTION, "implicit_exception", NONE, NONE, NONE)
MINI_OP(OP_VOIDCALL, "voidcall", NONE, NONE, NONE)
MINI_OP(OP_VOIDCALLVIRT, "voidcallvirt", NONE, NONE, NONE)
MINI_OP(OP_VCALL2, "vcall2", NONE, NONE, NONE)
MINI_OP(OP_VCALL2_REG, "vcall2_reg", NONE, IREG, NONE)
MINI_OP(OP_VCALL2_MEMBASE, "vcall2_membase", NONE, IREG, NONE)
+MINI_OP(OP_DYN_CALL, "dyn_call", NONE, IREG, IREG)
MINI_OP(OP_ICONST, "iconst", IREG, NONE, NONE)
MINI_OP(OP_I8CONST, "i8const", LREG, NONE, NONE)
MINI_OP(OP_THROW, "throw", NONE, IREG, NONE)
MINI_OP(OP_RETHROW, "rethrow", NONE, IREG, NONE)
+/*
+ * Vararg calls are implemented as follows:
+ * - the caller emits a hidden argument just before the varargs argument. this
+ * 'signature cookie' argument contains the signature describing the the call.
+ * - all implicit arguments are passed in memory right after the signature cookie, i.e.
+ * the stack will look like this:
+ * <argn>
+ * ..
+ * <arg1>
+ * <sig cookie>
+ * - the OP_ARGLIST opcode in the callee computes the address of the sig cookie argument
+ * on the stack and saves it into its sreg1.
+ * - mono_ArgIterator_Setup receives this value and uses it to find the signature and
+ * the arguments.
+ */
+MINI_OP(OP_ARGLIST, "oparglist", NONE, IREG, NONE)
+
/* MONO_IS_STORE_MEMBASE depends on the order here */
MINI_OP(OP_STORE_MEMBASE_REG,"store_membase_reg", IREG, IREG, NONE)
MINI_OP(OP_STOREI1_MEMBASE_REG, "storei1_membase_reg", IREG, IREG, NONE)
MINI_OP(OP_STOREI2_MEMBASE_REG, "storei2_membase_reg", IREG, IREG, NONE)
MINI_OP(OP_STOREI4_MEMBASE_REG, "storei4_membase_reg", IREG, IREG, NONE)
-MINI_OP(OP_STOREI8_MEMBASE_REG, "storei8_membase_reg", IREG, IREG, NONE)
+MINI_OP(OP_STOREI8_MEMBASE_REG, "storei8_membase_reg", IREG, LREG, NONE)
MINI_OP(OP_STORER4_MEMBASE_REG, "storer4_membase_reg", IREG, FREG, NONE)
MINI_OP(OP_STORER8_MEMBASE_REG, "storer8_membase_reg", IREG, FREG, NONE)
MINI_OP(OP_LOADI4_MEMINDEX,"loadi4_memindex", IREG, IREG, IREG)
MINI_OP(OP_LOADU4_MEMINDEX,"loadu4_memindex", IREG, IREG, IREG)
MINI_OP(OP_LOADI8_MEMINDEX,"loadi8_memindex", IREG, IREG, IREG)
-MINI_OP(OP_LOADR4_MEMINDEX,"loadr4_memindex", IREG, IREG, IREG)
-MINI_OP(OP_LOADR8_MEMINDEX,"loadr8_memindex", IREG, IREG, IREG)
+MINI_OP(OP_LOADR4_MEMINDEX,"loadr4_memindex", FREG, IREG, IREG)
+MINI_OP(OP_LOADR8_MEMINDEX,"loadr8_memindex", FREG, IREG, IREG)
/* indexed stores: store sreg1 at (destbasereg + sreg2) */
/* MONO_IS_STORE_MEMINDEX depends on the order here */
MINI_OP(OP_STORE_MEMINDEX,"store_memindex", IREG, IREG, IREG)
MINI_OP(OP_STOREI2_MEMINDEX,"storei2_memindex", IREG, IREG, IREG)
MINI_OP(OP_STOREI4_MEMINDEX,"storei4_memindex", IREG, IREG, IREG)
MINI_OP(OP_STOREI8_MEMINDEX,"storei8_memindex", IREG, IREG, IREG)
-MINI_OP(OP_STORER4_MEMINDEX,"storer4_memindex", IREG, IREG, IREG)
-MINI_OP(OP_STORER8_MEMINDEX,"storer8_memindex", IREG, IREG, IREG)
+MINI_OP(OP_STORER4_MEMINDEX,"storer4_memindex", IREG, FREG, IREG)
+MINI_OP(OP_STORER8_MEMINDEX,"storer8_memindex", IREG, FREG, IREG)
MINI_OP(OP_LOAD_MEM,"load_mem", IREG, NONE, NONE)
MINI_OP(OP_LOADU1_MEM,"loadu1_mem", IREG, NONE, NONE)
MINI_OP(OP_SAVE_LMF, "save_lmf", NONE, NONE, NONE)
MINI_OP(OP_RESTORE_LMF, "restore_lmf", NONE, NONE, NONE)
+/* write barrier */
+MINI_OP(OP_CARD_TABLE_WBARRIER, "card_table_wbarrier", NONE, IREG, IREG)
+
/* arch-dep tls access */
MINI_OP(OP_TLS_GET, "tls_get", IREG, NONE, NONE)
*/
MINI_OP(OP_LIVERANGE_END, "liverange_end", NONE, NONE, NONE)
+/* GC support */
+/*
+ * mono_arch_output_basic_block () will set the backend.pc_offset field to the current pc
+ * offset.
+ */
+MINI_OP(OP_GC_LIVENESS_DEF, "gc_liveness_def", NONE, NONE, NONE)
+MINI_OP(OP_GC_LIVENESS_USE, "gc_liveness_use", NONE, NONE, NONE)
+
+/*
+ * This marks the location inside a basic block where a GC tracked spill slot has been
+ * defined. The spill slot is assumed to be alive until the end of the bblock.
+ */
+MINI_OP(OP_GC_SPILL_SLOT_LIVENESS_DEF, "gc_spill_slot_liveness_def", NONE, NONE, NONE)
+
+/*
+ * This marks the location inside a basic block where a GC tracked param area slot has
+ * been defined. The slot is assumed to be alive until the next call.
+ */
+MINI_OP(OP_GC_PARAM_SLOT_LIVENESS_DEF, "gc_param_slot_liveness_def", NONE, NONE, NONE)
+
/* Arch specific opcodes */
+/* #if defined(__native_client_codegen__) || defined(__native_client__) */
+/* We have to define these in terms of the TARGET defines, not NaCl defines */
+/* because genmdesc.pl doesn't have multiple defines per platform. */
+#if defined(TARGET_AMD64) || defined(TARGET_X86)
+MINI_OP(OP_NACL_GC_SAFE_POINT, "nacl_gc_safe_point", IREG, NONE, NONE)
+#endif
+
#if defined(TARGET_X86) || defined(TARGET_AMD64)
MINI_OP(OP_X86_TEST_NULL, "x86_test_null", NONE, IREG, NONE)
MINI_OP(OP_X86_COMPARE_MEMBASE_REG,"x86_compare_membase_reg", NONE, IREG, IREG)
#endif
#if defined(__mips__)
-MINI_OP(OP_LONG_SHRUN_32, "long_shrun_32", NONE, NONE, NONE)
-MINI_OP(OP_MIPS_BEQ, "mips_beq", NONE, NONE, NONE)
-MINI_OP(OP_MIPS_BGEZ, "mips_bgez", NONE, NONE, NONE)
-MINI_OP(OP_MIPS_BGTZ, "mips_bgtz", NONE, NONE, NONE)
-MINI_OP(OP_MIPS_BLEZ, "mips_blez", NONE, NONE, NONE)
-MINI_OP(OP_MIPS_BLTZ, "mips_bltz", NONE, NONE, NONE)
-MINI_OP(OP_MIPS_BNE, "mips_bne", NONE, NONE, NONE)
+MINI_OP(OP_MIPS_BEQ, "mips_beq", NONE, IREG, IREG)
+MINI_OP(OP_MIPS_BGEZ, "mips_bgez", NONE, IREG, NONE)
+MINI_OP(OP_MIPS_BGTZ, "mips_bgtz", NONE, IREG, NONE)
+MINI_OP(OP_MIPS_BLEZ, "mips_blez", NONE, IREG, NONE)
+MINI_OP(OP_MIPS_BLTZ, "mips_bltz", NONE, IREG, NONE)
+MINI_OP(OP_MIPS_BNE, "mips_bne", NONE, IREG, IREG)
MINI_OP(OP_MIPS_CVTSD, "mips_cvtsd", FREG, FREG, NONE)
MINI_OP(OP_MIPS_FBEQ, "mips_fbeq", NONE, FREG, FREG)
MINI_OP(OP_MIPS_FBGE, "mips_fbge", NONE, FREG, FREG)