summaryrefslogtreecommitdiff
path: root/src/jit/emitxarch.cpp
diff options
context:
space:
mode:
authorTanner Gooding <tagoo@outlook.com>2018-01-29 21:20:08 -0800
committerTanner Gooding <tagoo@outlook.com>2018-02-03 07:48:26 -0800
commit41f8b17ae1741dbcb15eaf0e7456c82548672889 (patch)
treede39985a7714be82475ccd96df97592d03e4e5e0 /src/jit/emitxarch.cpp
parent67feb5e680e4e94756e0133744da2c7150565666 (diff)
downloadcoreclr-41f8b17ae1741dbcb15eaf0e7456c82548672889.tar.gz
coreclr-41f8b17ae1741dbcb15eaf0e7456c82548672889.tar.bz2
coreclr-41f8b17ae1741dbcb15eaf0e7456c82548672889.zip
Updating the HWIntrinsic codegen to support marking LoadVector128 and LoadAlignedVector128 as contained.
Diffstat (limited to 'src/jit/emitxarch.cpp')
-rw-r--r--src/jit/emitxarch.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/jit/emitxarch.cpp b/src/jit/emitxarch.cpp
index 99dbce19a8..e697b7bd57 100644
--- a/src/jit/emitxarch.cpp
+++ b/src/jit/emitxarch.cpp
@@ -4009,6 +4009,28 @@ void emitter::emitIns_R_A_I(instruction ins, emitAttr attr, regNumber reg1, GenT
emitCurIGsize += sz;
}
+void emitter::emitIns_R_AR_I(instruction ins, emitAttr attr, regNumber reg1, regNumber base, int offs, int ival)
+{
+ noway_assert(emitVerifyEncodable(ins, EA_SIZE(attr), reg1));
+ assert(IsSSEOrAVXInstruction(ins));
+
+ instrDesc* id = emitNewInstrAmdCns(attr, offs, ival);
+
+ id->idIns(ins);
+ id->idReg1(reg1);
+
+ id->idInsFmt(IF_RRW_ARD_CNS);
+ id->idAddr()->iiaAddrMode.amBaseReg = base;
+ id->idAddr()->iiaAddrMode.amIndxReg = REG_NA;
+
+ // Plus one for the 1-byte immediate (ival)
+ UNATIVE_OFFSET sz = emitInsSizeAM(id, insCodeRM(ins)) + emitGetVexPrefixAdjustedSize(ins, attr, insCodeRM(ins)) + 1;
+ id->idCodeSize(sz);
+
+ dispIns(id);
+ emitCurIGsize += sz;
+}
+
void emitter::emitIns_R_C_I(
instruction ins, emitAttr attr, regNumber reg1, CORINFO_FIELD_HANDLE fldHnd, int offs, int ival)
{
@@ -4202,6 +4224,30 @@ void emitter::emitIns_R_R_A_I(
dispIns(id);
emitCurIGsize += sz;
}
+
+void emitter::emitIns_R_R_AR_I(
+ instruction ins, emitAttr attr, regNumber reg1, regNumber reg2, regNumber base, int offs, int ival)
+{
+ assert(IsSSEOrAVXInstruction(ins));
+ assert(IsThreeOperandAVXInstruction(ins));
+
+ instrDesc* id = emitNewInstrAmdCns(attr, offs, ival);
+
+ id->idIns(ins);
+ id->idReg1(reg1);
+ id->idReg2(reg2);
+
+ id->idInsFmt(IF_RWR_RRD_ARD_CNS);
+ id->idAddr()->iiaAddrMode.amBaseReg = base;
+ id->idAddr()->iiaAddrMode.amIndxReg = REG_NA;
+
+ // Plus one for the 1-byte immediate (ival)
+ UNATIVE_OFFSET sz = emitInsSizeAM(id, insCodeRM(ins)) + emitGetVexPrefixAdjustedSize(ins, attr, insCodeRM(ins)) + 1;
+ id->idCodeSize(sz);
+
+ dispIns(id);
+ emitCurIGsize += sz;
+}
#endif // !LEGACY_BACKEND
void emitter::emitIns_R_R_C_I(
@@ -5396,6 +5442,23 @@ void emitter::emitIns_SIMD_R_R_A_I(
}
}
+void emitter::emitIns_SIMD_R_R_AR_I(
+ instruction ins, emitAttr attr, regNumber reg, regNumber reg1, regNumber base, int ival)
+{
+ if (UseVEXEncoding())
+ {
+ emitIns_R_R_AR_I(ins, attr, reg, reg1, base, 0, ival);
+ }
+ else
+ {
+ if (reg1 != reg)
+ {
+ emitIns_R_R(INS_movaps, attr, reg, reg1);
+ }
+ emitIns_R_AR_I(ins, attr, reg, base, 0, ival);
+ }
+}
+
void emitter::emitIns_SIMD_R_R_C_I(
instruction ins, emitAttr attr, regNumber reg, regNumber reg1, CORINFO_FIELD_HANDLE fldHnd, int offs, int ival)
{