bool CannotFold = false;
bool IsLoad = false;
bool IsStore = false;
- bool IsAligned = false;
Align Alignment;
X86FoldTableEntry() = default;
Attrs += "TB_NO_REVERSE|";
if (CannotFold)
Attrs += "TB_NO_FORWARD|";
- if (IsAligned)
+ if (Alignment != Align(1))
Attrs += "TB_ALIGN_" + std::to_string(Alignment.value()) + "|";
StringRef SimplifiedAttrs = StringRef(Attrs).rtrim("|");
Result.CannotFold = (S & TB_NO_FORWARD) != 0;
Result.IsLoad = (S & TB_FOLDED_LOAD) != 0;
Result.IsStore = (S & TB_FOLDED_STORE) != 0;
- Result.IsAligned = (S & TB_ALIGN_MASK) != 0;
Result.Alignment = Align(1ULL << ((S & TB_ALIGN_MASK) >> TB_ALIGN_SHIFT));
Table[RegInstr] = Result;
return;
if (isExplicitAlign(RegInstr)) {
// The instruction require explicitly aligned memory.
BitsInit *VectSize = RegRec->getValueAsBitsInit("VectSize");
- Result.IsAligned = true;
Result.Alignment = Align(byteFromBitsInit(VectSize));
} else if (!Enc && !isExplicitUnalign(RegInstr) &&
getMemOperandSize(MemOpRec) > 64) {
// Instructions with XOP/VEX/EVEX encoding do not require alignment while
// SSE packed vector instructions require a 16 byte alignment.
- Result.IsAligned = true;
Result.Alignment = Align(16);
}
// Expand is only ever created as a masked instruction. It is not safe to