forked from OSchip/llvm-project
AVX-512: fixed a bug in EVEX encoding (the bug appeared after r200624)
llvm-svn: 200837
This commit is contained in:
parent
a54308fc6d
commit
a38114c45e
|
@ -184,7 +184,7 @@ static bool isDisp8(int Value) {
|
|||
/// isCDisp8 - Return true if this signed displacement fits in a 8-bit
|
||||
/// compressed dispacement field.
|
||||
static bool isCDisp8(uint64_t TSFlags, int Value, int& CValue) {
|
||||
assert(((TSFlags >> X86II::VEXShift) & X86II::EVEX) &&
|
||||
assert((TSFlags & X86II::EncodingMask) >> X86II::EncodingShift == X86II::EVEX &&
|
||||
"Compressed 8-bit displacement is only valid for EVEX inst.");
|
||||
|
||||
unsigned CD8E = (TSFlags >> X86II::EVEX_CD8EShift) & X86II::EVEX_CD8EMask;
|
||||
|
@ -386,7 +386,9 @@ void X86MCCodeEmitter::EmitMemModRMByte(const MCInst &MI, unsigned Op,
|
|||
const MCOperand &Scale = MI.getOperand(Op+X86::AddrScaleAmt);
|
||||
const MCOperand &IndexReg = MI.getOperand(Op+X86::AddrIndexReg);
|
||||
unsigned BaseReg = Base.getReg();
|
||||
bool HasEVEX = (TSFlags >> X86II::VEXShift) & X86II::EVEX;
|
||||
unsigned char Encoding = (TSFlags & X86II::EncodingMask) >>
|
||||
X86II::EncodingShift;
|
||||
bool HasEVEX = (Encoding == X86II::EVEX);
|
||||
|
||||
// Handle %rip relative addressing.
|
||||
if (BaseReg == X86::RIP) { // [disp32+RIP] in X86-64 mode
|
||||
|
|
|
@ -43,3 +43,7 @@ vpbroadcastd %xmm0, %zmm1 {%k1} {z}
|
|||
// CHECK: vmovdqu64 {{.*}} {%k3}
|
||||
// CHECK: encoding: [0x62,0xf1,0xfe,0x4b,0x6f,0xc8]
|
||||
vmovdqu64 %zmm0, %zmm1 {%k3}
|
||||
|
||||
// CHECK: vmovd
|
||||
// CHECK: encoding: [0x62,0xe1,0x7d,0x08,0x7e,0xb4,0x24,0xac,0xff,0xff,0xff]
|
||||
vmovd %xmm22, -84(%rsp)
|
Loading…
Reference in New Issue