mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 09:45:00 +00:00
Add AVX MOVMSK{PS,PD}rr instructions
llvm-svn: 106683
This commit is contained in:
parent
c6ac26123d
commit
b1bfbacead
@ -1456,13 +1456,26 @@ let Constraints = "$src1 = $dst" in {
|
||||
} // AddedComplexity
|
||||
} // Constraints = "$src1 = $dst"
|
||||
|
||||
multiclass sse12_extr_sign_mask<RegisterClass RC, Intrinsic Int, string asm,
|
||||
Domain d> {
|
||||
def rr : PI<0x50, MRMSrcReg, (outs GR32:$dst), (ins RC:$src),
|
||||
!strconcat(asm, "\t{$src, $dst|$dst, $src}"),
|
||||
[(set GR32:$dst, (Int RC:$src))], d>;
|
||||
}
|
||||
|
||||
// Mask creation
|
||||
def MOVMSKPSrr : PSI<0x50, MRMSrcReg, (outs GR32:$dst), (ins VR128:$src),
|
||||
"movmskps\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, (int_x86_sse_movmsk_ps VR128:$src))]>;
|
||||
def MOVMSKPDrr : PDI<0x50, MRMSrcReg, (outs GR32:$dst), (ins VR128:$src),
|
||||
"movmskpd\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, (int_x86_sse2_movmsk_pd VR128:$src))]>;
|
||||
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",
|
||||
SSEPackedDouble>, TB, OpSize;
|
||||
|
||||
let isAsmParserOnly = 1 in {
|
||||
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;
|
||||
}
|
||||
|
||||
// Prefetch intrinsic.
|
||||
def PREFETCHT0 : PSI<0x18, MRM1m, (outs), (ins i8mem:$src),
|
||||
|
@ -10517,3 +10517,12 @@
|
||||
// CHECK: vcmppd $3, -4(%ebx,%ecx,8), %xmm2, %xmm3
|
||||
// CHECK: encoding: [0xc5,0xe9,0xc2,0x5c,0xcb,0xfc,0x03]
|
||||
vcmpunordpd -4(%ebx,%ecx,8), %xmm2, %xmm3
|
||||
|
||||
// CHECK: vmovmskps %xmm2, %eax
|
||||
// CHECK: encoding: [0xc5,0xf8,0x50,0xc2]
|
||||
vmovmskps %xmm2, %eax
|
||||
|
||||
// CHECK: vmovmskpd %xmm2, %eax
|
||||
// CHECK: encoding: [0xc5,0xf9,0x50,0xc2]
|
||||
vmovmskpd %xmm2, %eax
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user