mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
Fix PR10677. Initial patch and idea by Peter Cooper but I've changed the
implementation! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138029 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -533,9 +533,14 @@ void X86MCCodeEmitter::EmitVEXOpcodePrefix(uint64_t TSFlags, unsigned &CurByte,
|
|||||||
const MCOperand &MO = MI.getOperand(CurOp);
|
const MCOperand &MO = MI.getOperand(CurOp);
|
||||||
if (MO.isReg() && X86II::isX86_64ExtendedReg(MO.getReg()))
|
if (MO.isReg() && X86II::isX86_64ExtendedReg(MO.getReg()))
|
||||||
VEX_B = 0x0;
|
VEX_B = 0x0;
|
||||||
if (!VEX_B && MO.isReg() &&
|
// Only set VEX_X if the Index Register is extended
|
||||||
((TSFlags & X86II::FormMask) == X86II::MRMSrcMem) &&
|
if (VEX_B || !MO.isReg())
|
||||||
X86II::isX86_64ExtendedReg(MO.getReg()))
|
continue;
|
||||||
|
if (!X86II::isX86_64ExtendedReg(MO.getReg()))
|
||||||
|
continue;
|
||||||
|
unsigned Frm = TSFlags & X86II::FormMask;
|
||||||
|
if ((Frm == X86II::MRMSrcMem && CurOp-1 == X86::AddrIndexReg) ||
|
||||||
|
(Frm == X86II::MRMDestMem && CurOp == X86::AddrIndexReg))
|
||||||
VEX_X = 0x0;
|
VEX_X = 0x0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@@ -3316,3 +3316,19 @@ vdivpd -4(%rcx,%rbx,8), %xmm10, %xmm11
|
|||||||
// CHECK: encoding: [0xc4,0x63,0x1d,0x4b,0xac,0x20,0xad,0xde,0x00,0x00,0xb0]
|
// CHECK: encoding: [0xc4,0x63,0x1d,0x4b,0xac,0x20,0xad,0xde,0x00,0x00,0xb0]
|
||||||
vblendvpd %ymm11, 0xdead(%rax,%riz), %ymm12, %ymm13
|
vblendvpd %ymm11, 0xdead(%rax,%riz), %ymm12, %ymm13
|
||||||
|
|
||||||
|
// CHECK: vmovaps %xmm3, (%r14,%r11)
|
||||||
|
// CHECK: encoding: [0xc4,0x81,0x78,0x29,0x1c,0x1e]
|
||||||
|
vmovaps %xmm3, (%r14,%r11)
|
||||||
|
|
||||||
|
// CHECK: vmovaps (%r14,%r11), %xmm3
|
||||||
|
// CHECK: encoding: [0xc4,0x81,0x78,0x28,0x1c,0x1e]
|
||||||
|
vmovaps (%r14,%r11), %xmm3
|
||||||
|
|
||||||
|
// CHECK: vmovaps %xmm3, (%r14,%rbx)
|
||||||
|
// CHECK: encoding: [0xc4,0xc1,0x78,0x29,0x1c,0x1e]
|
||||||
|
vmovaps %xmm3, (%r14,%rbx)
|
||||||
|
|
||||||
|
// CHECK: vmovaps (%r14,%rbx), %xmm3
|
||||||
|
// CHECK: encoding: [0xc4,0xc1,0x78,0x28,0x1c,0x1e]
|
||||||
|
vmovaps (%r14,%rbx), %xmm3
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user