Skip to content

Commit 1e29dd6

Browse files
committed
Address review comments
1 parent f79afd4 commit 1e29dd6

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4001,7 +4001,7 @@ unsigned X86AsmParser::checkTargetMatchPredicate(MCInst &Inst) {
40014001

40024002
if (UseApxExtendedReg && !X86II::canUseApxExtendedReg(MCID))
40034003
return Match_Unsupported;
4004-
if (ForcedNoFlag != static_cast<bool>(MCID.TSFlags & X86II::EVEX_NF))
4004+
if (ForcedNoFlag != !!(MCID.TSFlags & X86II::EVEX_NF))
40054005
return Match_Unsupported;
40064006

40074007
if (ForcedVEXEncoding == VEXEncoding_EVEX &&

llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ inline unsigned getOperandBias(const MCInstrDesc &Desc) {
996996
}
997997

998998
/// \returns true if the instruction has a NDD (new data destination).
999-
inline bool isND(uint64_t TSFlags) {
999+
inline bool hasNewDataDestination(uint64_t TSFlags) {
10001000
return (TSFlags & X86II::OpMapMask) == X86II::T_MAP4 &&
10011001
(TSFlags & X86II::EVEX_B) && (TSFlags & X86II::VEX_4V);
10021002
}
@@ -1027,7 +1027,7 @@ inline int getMemoryOperandNo(uint64_t TSFlags) {
10271027
return -1;
10281028
case X86II::MRMDestMem:
10291029
case X86II::MRMDestMemFSIB:
1030-
return isND(TSFlags);
1030+
return hasNewDataDestination(TSFlags);
10311031
case X86II::MRMSrcMem:
10321032
case X86II::MRMSrcMemFSIB:
10331033
// Start from 1, skip any registers encoded in VEX_VVVV or I8IMM, or a

llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,7 @@ X86MCCodeEmitter::emitVEXOpcodePrefix(int MemOperand, const MCInst &MI,
10511051

10521052
bool EncodeRC = false;
10531053
uint8_t EVEX_rc = 0;
1054-
bool IsND = X86II::isND(TSFlags);
1054+
bool IsND = X86II::hasNewDataDestination(TSFlags);
10551055

10561056
unsigned CurOp = X86II::getOperandBias(Desc);
10571057

@@ -1078,7 +1078,7 @@ X86MCCodeEmitter::emitVEXOpcodePrefix(int MemOperand, const MCInst &MI,
10781078
// MemAddr, src1(ModR/M), imm8
10791079
//
10801080
// NDD:
1081-
// dst(VEX_4V), MemAddr, src1(ModR/M)
1081+
// dst(VEX_4V), MemAddr, src1(ModR/M)
10821082
Prefix.setBB2(MI, MemOperand + X86::AddrBaseReg);
10831083
Prefix.setXX2(MI, MemOperand + X86::AddrIndexReg);
10841084
Prefix.setV2(MI, MemOperand + X86::AddrIndexReg, HasVEX_4V);
@@ -1533,7 +1533,7 @@ void X86MCCodeEmitter::encodeInstruction(const MCInst &MI,
15331533

15341534
unsigned OpcodeOffset = 0;
15351535

1536-
bool IsND = X86II::isND(TSFlags);
1536+
bool IsND = X86II::hasNewDataDestination(TSFlags);
15371537

15381538
uint64_t Form = TSFlags & X86II::FormMask;
15391539
switch (Form) {

llvm/utils/TableGen/X86RecognizableInstr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ enum { PD = 1, XS = 2, XD = 3, PS = 4 };
172172
enum { VEX = 1, XOP = 2, EVEX = 3 };
173173
enum { OpSize16 = 1, OpSize32 = 2 };
174174
enum { AdSize16 = 1, AdSize32 = 2, AdSize64 = 3 };
175-
enum { ExplicitREX2 = 1, ExplicitVEX = 2, ExplicitEVEX = 3 };
175+
enum { ExplicitREX2 = 1, ExplicitEVEX = 3 };
176176
} // namespace X86Local
177177

178178
namespace X86Disassembler {

0 commit comments

Comments
 (0)