mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
Reorder declarations of vmovmskp* and also put the necessary AVX
predicate and TB encoding fields. This fix the encoding for the attached testcase. This fixes PR10625. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137684 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3655a21b15
commit
1deddbbd56
@ -1475,17 +1475,6 @@ multiclass sse12_extr_sign_mask<RegisterClass RC, Intrinsic Int, string asm,
|
||||
!strconcat(asm, "\t{$src, $dst|$dst, $src}"), [], d>, REX_W;
|
||||
}
|
||||
|
||||
// Mask creation
|
||||
defm VMOVMSKPS : sse12_extr_sign_mask<VR128, int_x86_sse_movmsk_ps,
|
||||
"movmskps", SSEPackedSingle>, VEX;
|
||||
defm VMOVMSKPD : sse12_extr_sign_mask<VR128, int_x86_sse2_movmsk_pd,
|
||||
"movmskpd", SSEPackedDouble>, OpSize,
|
||||
VEX;
|
||||
defm VMOVMSKPSY : sse12_extr_sign_mask<VR256, int_x86_avx_movmsk_ps_256,
|
||||
"movmskps", SSEPackedSingle>, VEX;
|
||||
defm VMOVMSKPDY : sse12_extr_sign_mask<VR256, int_x86_avx_movmsk_pd_256,
|
||||
"movmskpd", SSEPackedDouble>, OpSize,
|
||||
VEX;
|
||||
defm MOVMSKPS : sse12_extr_sign_mask<VR128, int_x86_sse_movmsk_ps, "movmskps",
|
||||
SSEPackedSingle>, TB;
|
||||
defm MOVMSKPD : sse12_extr_sign_mask<VR128, int_x86_sse2_movmsk_pd, "movmskpd",
|
||||
@ -1493,29 +1482,44 @@ defm MOVMSKPD : sse12_extr_sign_mask<VR128, int_x86_sse2_movmsk_pd, "movmskpd",
|
||||
|
||||
// X86fgetsign
|
||||
def MOVMSKPDrr32_alt : PI<0x50, MRMSrcReg, (outs GR32:$dst), (ins FR64:$src),
|
||||
"movmskpd\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, (X86fgetsign FR64:$src))], SSEPackedDouble>, TB, OpSize;
|
||||
"movmskpd\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, (X86fgetsign FR64:$src))], SSEPackedDouble>, TB,
|
||||
OpSize;
|
||||
def MOVMSKPDrr64_alt : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins FR64:$src),
|
||||
"movmskpd\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, (X86fgetsign FR64:$src))], SSEPackedDouble>, TB, OpSize;
|
||||
"movmskpd\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, (X86fgetsign FR64:$src))], SSEPackedDouble>, TB,
|
||||
OpSize;
|
||||
def MOVMSKPSrr32_alt : PI<0x50, MRMSrcReg, (outs GR32:$dst), (ins FR32:$src),
|
||||
"movmskps\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, (X86fgetsign FR32:$src))], SSEPackedSingle>, TB;
|
||||
"movmskps\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, (X86fgetsign FR32:$src))], SSEPackedSingle>, TB;
|
||||
def MOVMSKPSrr64_alt : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins FR32:$src),
|
||||
"movmskps\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, (X86fgetsign FR32:$src))], SSEPackedSingle>, TB;
|
||||
"movmskps\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, (X86fgetsign FR32:$src))], SSEPackedSingle>, TB;
|
||||
|
||||
// Assembler Only
|
||||
def VMOVMSKPSr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR128:$src),
|
||||
"movmskps\t{$src, $dst|$dst, $src}", [], SSEPackedSingle>, VEX;
|
||||
def VMOVMSKPDr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR128:$src),
|
||||
"movmskpd\t{$src, $dst|$dst, $src}", [], SSEPackedDouble>, OpSize,
|
||||
VEX;
|
||||
def VMOVMSKPSYr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR256:$src),
|
||||
"movmskps\t{$src, $dst|$dst, $src}", [], SSEPackedSingle>, VEX;
|
||||
def VMOVMSKPDYr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR256:$src),
|
||||
"movmskpd\t{$src, $dst|$dst, $src}", [], SSEPackedDouble>, OpSize,
|
||||
VEX;
|
||||
let Predicates = [HasAVX] in {
|
||||
defm VMOVMSKPS : sse12_extr_sign_mask<VR128, int_x86_sse_movmsk_ps,
|
||||
"movmskps", SSEPackedSingle>, TB, VEX;
|
||||
defm VMOVMSKPD : sse12_extr_sign_mask<VR128, int_x86_sse2_movmsk_pd,
|
||||
"movmskpd", SSEPackedDouble>, TB, OpSize,
|
||||
VEX;
|
||||
defm VMOVMSKPSY : sse12_extr_sign_mask<VR256, int_x86_avx_movmsk_ps_256,
|
||||
"movmskps", SSEPackedSingle>, TB, VEX;
|
||||
defm VMOVMSKPDY : sse12_extr_sign_mask<VR256, int_x86_avx_movmsk_pd_256,
|
||||
"movmskpd", SSEPackedDouble>, TB, OpSize,
|
||||
VEX;
|
||||
|
||||
// Assembler Only
|
||||
def VMOVMSKPSr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR128:$src),
|
||||
"movmskps\t{$src, $dst|$dst, $src}", [], SSEPackedSingle>, VEX;
|
||||
def VMOVMSKPDr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR128:$src),
|
||||
"movmskpd\t{$src, $dst|$dst, $src}", [], SSEPackedDouble>, OpSize,
|
||||
VEX;
|
||||
def VMOVMSKPSYr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR256:$src),
|
||||
"movmskps\t{$src, $dst|$dst, $src}", [], SSEPackedSingle>, VEX;
|
||||
def VMOVMSKPDYr64r : PI<0x50, MRMSrcReg, (outs GR64:$dst), (ins VR256:$src),
|
||||
"movmskpd\t{$src, $dst|$dst, $src}", [], SSEPackedDouble>, OpSize,
|
||||
VEX;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// SSE 1 & 2 - Misc aliasing of packed SSE 1 & 2 instructions
|
||||
|
@ -479,6 +479,14 @@
|
||||
// CHECK: encoding: [0xc5,0xf9,0x50,0xc2]
|
||||
vmovmskpd %xmm2, %eax
|
||||
|
||||
// CHECK: vmovmskps %ymm2, %eax
|
||||
// CHECK: encoding: [0xc5,0xfc,0x50,0xc2]
|
||||
vmovmskps %ymm2, %eax
|
||||
|
||||
// CHECK: vmovmskpd %ymm2, %eax
|
||||
// CHECK: encoding: [0xc5,0xfd,0x50,0xc2]
|
||||
vmovmskpd %ymm2, %eax
|
||||
|
||||
// CHECK: vcmpss $0, %xmm1, %xmm2, %xmm3
|
||||
// CHECK: encoding: [0xc5,0xea,0xc2,0xd9,0x00]
|
||||
vcmpeqss %xmm1, %xmm2, %xmm3
|
||||
|
Loading…
x
Reference in New Issue
Block a user