{
// We will use lea so displacement and not immediate will be relocatable
size = EA_SET_FLG(EA_REMOVE_FLG(size, EA_CNS_RELOC_FLG), EA_DSP_RELOC_FLG);
- GetEmitter()->emitIns_R_AI(INS_lea, size, reg, imm);
+ GetEmitter()->emitIns_R_AI(INS_lea, size, reg, imm DEBUGARG(targetHandle) DEBUGARG(gtFlags));
}
else
{
emitIns_R_ARX(ins, attr, reg, base, REG_NA, 1, disp);
}
-void emitter::emitIns_R_AI(instruction ins, emitAttr attr, regNumber ireg, ssize_t disp)
+void emitter::emitIns_R_AI(instruction ins,
+ emitAttr attr,
+ regNumber ireg,
+ ssize_t disp DEBUGARG(size_t targetHandle) DEBUGARG(GenTreeFlags gtFlags))
{
assert((CodeGen::instIsFP(ins) == false) && (EA_SIZE(attr) <= EA_8BYTE) && (ireg != REG_NA));
noway_assert(emitVerifyEncodable(ins, EA_SIZE(attr), ireg));
id->idAddr()->iiaAddrMode.amBaseReg = REG_NA;
id->idAddr()->iiaAddrMode.amIndxReg = REG_NA;
+#ifdef DEBUG
+ id->idDebugOnlyInfo()->idFlags = gtFlags;
+ id->idDebugOnlyInfo()->idMemCookie = targetHandle;
+#endif
+
assert(emitGetInsAmdAny(id) == disp); // make sure "disp" is stored properly
sz = emitInsSizeAM(id, insCodeRM(ins));
void emitIns_R_AR(instruction ins, emitAttr attr, regNumber reg, regNumber base, int disp);
-void emitIns_R_AI(instruction ins, emitAttr attr, regNumber ireg, ssize_t disp);
+void emitIns_R_AI(instruction ins,
+ emitAttr attr,
+ regNumber ireg,
+ ssize_t disp DEBUGARG(size_t targetHandle = 0) DEBUGARG(GenTreeFlags gtFlags = GTF_EMPTY));
void emitIns_AR_R(instruction ins, emitAttr attr, regNumber reg, regNumber base, cnsval_ssize_t disp);