mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 02:29:18 +00:00
AVX-512: fixed a bug in EVEX encoding (the bug appeared after r200624)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200837 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cf4061a601
commit
1ee5ca7005
@ -184,7 +184,7 @@ static bool isDisp8(int Value) {
|
|||||||
/// isCDisp8 - Return true if this signed displacement fits in a 8-bit
|
/// isCDisp8 - Return true if this signed displacement fits in a 8-bit
|
||||||
/// compressed dispacement field.
|
/// compressed dispacement field.
|
||||||
static bool isCDisp8(uint64_t TSFlags, int Value, int& CValue) {
|
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.");
|
"Compressed 8-bit displacement is only valid for EVEX inst.");
|
||||||
|
|
||||||
unsigned CD8E = (TSFlags >> X86II::EVEX_CD8EShift) & X86II::EVEX_CD8EMask;
|
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 &Scale = MI.getOperand(Op+X86::AddrScaleAmt);
|
||||||
const MCOperand &IndexReg = MI.getOperand(Op+X86::AddrIndexReg);
|
const MCOperand &IndexReg = MI.getOperand(Op+X86::AddrIndexReg);
|
||||||
unsigned BaseReg = Base.getReg();
|
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.
|
// Handle %rip relative addressing.
|
||||||
if (BaseReg == X86::RIP) { // [disp32+RIP] in X86-64 mode
|
if (BaseReg == X86::RIP) { // [disp32+RIP] in X86-64 mode
|
||||||
|
@ -43,3 +43,7 @@ vpbroadcastd %xmm0, %zmm1 {%k1} {z}
|
|||||||
// CHECK: vmovdqu64 {{.*}} {%k3}
|
// CHECK: vmovdqu64 {{.*}} {%k3}
|
||||||
// CHECK: encoding: [0x62,0xf1,0xfe,0x4b,0x6f,0xc8]
|
// CHECK: encoding: [0x62,0xf1,0xfe,0x4b,0x6f,0xc8]
|
||||||
vmovdqu64 %zmm0, %zmm1 {%k3}
|
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
Block a user