diff --git a/lib/Target/X86/X86InstrFormats.td b/lib/Target/X86/X86InstrFormats.td index 1c4301c7038..5c422e7cd45 100644 --- a/lib/Target/X86/X86InstrFormats.td +++ b/lib/Target/X86/X86InstrFormats.td @@ -220,6 +220,7 @@ class Iseg32 o, Format f, dag outs, dag ins, string asm, // PSI - SSE1 instructions with TB prefix. // PSIi8 - SSE1 instructions with ImmT == Imm8 and TB prefix. // VSSI - SSE1 instructions with XS prefix in AVX form. +// VPSI - SSE1 instructions with TB prefix in AVX form. class SSI o, Format F, dag outs, dag ins, string asm, list pattern> : I, XS, Requires<[HasSSE1]>; @@ -237,6 +238,10 @@ class VSSI o, Format F, dag outs, dag ins, string asm, list pattern> : I, XS, VEX_4V, Requires<[HasAVX, HasSSE1]>; +class VPSI o, Format F, dag outs, dag ins, string asm, + list pattern> + : I, + VEX_4V, Requires<[HasAVX, HasSSE1]>; // SSE2 Instruction Templates: // @@ -246,6 +251,7 @@ class VSSI o, Format F, dag outs, dag ins, string asm, // PDI - SSE2 instructions with TB and OpSize prefixes. // PDIi8 - SSE2 instructions with ImmT == Imm8 and TB and OpSize prefixes. // VSDI - SSE2 instructions with XD prefix in AVX form. +// VPDI - SSE2 instructions with TB and OpSize prefixes in AVX form. class SDI o, Format F, dag outs, dag ins, string asm, list pattern> : I, XD, Requires<[HasSSE2]>; @@ -266,6 +272,10 @@ class VSDI o, Format F, dag outs, dag ins, string asm, list pattern> : I, XD, VEX_4V, Requires<[HasAVX, HasSSE2]>; +class VPDI o, Format F, dag outs, dag ins, string asm, + list pattern> + : I, + VEX_4V, OpSize, Requires<[HasAVX, HasSSE2]>; // SSE3 Instruction Templates: // diff --git a/lib/Target/X86/X86InstrSSE.td b/lib/Target/X86/X86InstrSSE.td index fe66d8b011e..945d69f9e26 100644 --- a/lib/Target/X86/X86InstrSSE.td +++ b/lib/Target/X86/X86InstrSSE.td @@ -737,6 +737,26 @@ multiclass basic_sse12_fp_binop_rm opc, string OpcodeStr, let isCommutable = Commutable; } + def V#NAME#PSrr : VPSI { + let isCommutable = Commutable; + let Constraints = ""; + let isAsmParserOnly = 1; + } + + def V#NAME#PDrr : VPDI { + let isCommutable = Commutable; + let Constraints = ""; + let isAsmParserOnly = 1; + } + // Vector operation, reg+mem. def PSrm : PSI