#define NEW_JIT_ICALL_ADDRCONST(cfg,dest,name) NEW_AOTCONST ((cfg), (dest), MONO_PATCH_INFO_JIT_ICALL_ADDR, (name))
-#define GET_VARINFO_INST(cfg,num) ((cfg)->varinfo [(num)]->inst)
-
#define NEW_VARLOAD(cfg,dest,var,vartype) do { \
MONO_INST_NEW ((cfg), (dest), OP_MOVE); \
(dest)->opcode = mono_type_to_regmove ((cfg), (vartype)); \
MonoInst *iargs [2]; \
iargs [0] = (inst); \
EMIT_NEW_VARLOADA (cfg, iargs [1], (var), (vartype)); \
- mono_emit_jit_icall (cfg, mono_fstore_r4, iargs); \
+ (dest) = mono_emit_jit_icall (cfg, mono_fstore_r4, iargs); \
} else { \
EMIT_NEW_VARSTORE ((cfg), (dest), (var), (vartype), (inst)); \
} \
MONO_ADD_INS ((cfg)->cbb, inst); \
} while (0)
+#define MONO_EMIT_NEW_DUMMY_INIT(cfg,dr,op) do { \
+ MonoInst *inst; \
+ MONO_INST_NEW ((cfg), (inst), (op)); \
+ inst->dreg = dr; \
+ MONO_ADD_INS ((cfg)->cbb, inst); \
+ } while (0)
+
#ifdef MONO_ARCH_NEED_GOT_VAR
#define MONO_EMIT_NEW_AOTCONST(cfg,dr,cons,patch_type) do { \
if (!(cfg->opt & MONO_OPT_ABCREM)) { \
MONO_EMIT_NULL_CHECK (cfg, array_reg); \
if (COMPILE_LLVM (cfg)) \
- MONO_EMIT_DEFAULT_BOUNDS_CHECK ((cfg), (array_reg), G_STRUCT_OFFSET (array_type, array_length_field), (index_reg), TRUE); \
+ MONO_EMIT_DEFAULT_BOUNDS_CHECK ((cfg), (array_reg), MONO_STRUCT_OFFSET (array_type, array_length_field), (index_reg), TRUE); \
else \
- MONO_ARCH_EMIT_BOUNDS_CHECK ((cfg), (array_reg), G_STRUCT_OFFSET (array_type, array_length_field), (index_reg)); \
+ MONO_ARCH_EMIT_BOUNDS_CHECK ((cfg), (array_reg), MONO_STRUCT_OFFSET (array_type, array_length_field), (index_reg)); \
} else { \
MonoInst *ins; \
MONO_INST_NEW ((cfg), ins, OP_BOUNDS_CHECK); \
ins->sreg1 = array_reg; \
ins->sreg2 = index_reg; \
- ins->inst_imm = G_STRUCT_OFFSET (array_type, array_length_field); \
+ ins->inst_imm = MONO_STRUCT_OFFSET (array_type, array_length_field); \
ins->flags |= MONO_INST_FAULT; \
MONO_ADD_INS ((cfg)->cbb, ins); \
(cfg)->flags |= MONO_CFG_HAS_ARRAY_ACCESS; \