[llvm-commits] [llvm] r108224 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td test/MC/AsmParser/X86/x86_32-encoding.s test/MC/AsmParser/X86/x86_64-encoding.s
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Mon Jul 12 19:38:35 PDT 2010
Author: bruno
Date: Mon Jul 12 21:38:35 2010
New Revision: 108224
URL: http://llvm.org/viewvc/llvm-project?rev=108224&view=rev
Log:
Add AVX 256-bit packed logical forms
Modified:
llvm/trunk/lib/Target/X86/X86InstrSSE.td
llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s
llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s
Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=108224&r1=108223&r2=108224&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Mon Jul 12 21:38:35 2010
@@ -1422,6 +1422,25 @@
}
}
+/// sse12_fp_packed_logical_y - AVX 256-bit SSE 1 & 2 logical ops forms
+///
+let isAsmParserOnly = 1 in {
+multiclass sse12_fp_packed_logical_y<bits<8> opc, string OpcodeStr> {
+ defm PSY : sse12_fp_packed_logical_rm<opc, VR256, SSEPackedSingle,
+ !strconcat(OpcodeStr, "ps"), f256mem, [], [], 0>, VEX_4V;
+
+ defm PDY : sse12_fp_packed_logical_rm<opc, VR256, SSEPackedDouble,
+ !strconcat(OpcodeStr, "pd"), f256mem, [], [], 0>, OpSize, VEX_4V;
+}
+}
+
+// AVX 256-bit packed logical ops forms
+defm VAND : sse12_fp_packed_logical_y<0x54, "and">;
+defm VOR : sse12_fp_packed_logical_y<0x56, "or">;
+defm VXOR : sse12_fp_packed_logical_y<0x57, "xor">;
+let isCommutable = 0 in
+ defm VANDN : sse12_fp_packed_logical_y<0x55, "andn">;
+
defm AND : sse12_fp_packed_logical<0x54, "and", and>;
defm OR : sse12_fp_packed_logical<0x56, "or", or>;
defm XOR : sse12_fp_packed_logical<0x57, "xor", xor>;
Modified: llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s?rev=108224&r1=108223&r2=108224&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s (original)
+++ llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Mon Jul 12 21:38:35 2010
@@ -12534,3 +12534,67 @@
// CHECK: encoding: [0xc5,0xfc,0x53,0x10]
vrcpps (%eax), %ymm2
+// CHECK: vandps %ymm2, %ymm4, %ymm6
+// CHECK: encoding: [0xc5,0xdc,0x54,0xf2]
+ vandps %ymm2, %ymm4, %ymm6
+
+// CHECK: vandpd %ymm2, %ymm4, %ymm6
+// CHECK: encoding: [0xc5,0xdd,0x54,0xf2]
+ vandpd %ymm2, %ymm4, %ymm6
+
+// CHECK: vandps -4(%ebx,%ecx,8), %ymm2, %ymm5
+// CHECK: encoding: [0xc5,0xec,0x54,0x6c,0xcb,0xfc]
+ vandps -4(%ebx,%ecx,8), %ymm2, %ymm5
+
+// CHECK: vandpd -4(%ebx,%ecx,8), %ymm2, %ymm5
+// CHECK: encoding: [0xc5,0xed,0x54,0x6c,0xcb,0xfc]
+ vandpd -4(%ebx,%ecx,8), %ymm2, %ymm5
+
+// CHECK: vorps %ymm2, %ymm4, %ymm6
+// CHECK: encoding: [0xc5,0xdc,0x56,0xf2]
+ vorps %ymm2, %ymm4, %ymm6
+
+// CHECK: vorpd %ymm2, %ymm4, %ymm6
+// CHECK: encoding: [0xc5,0xdd,0x56,0xf2]
+ vorpd %ymm2, %ymm4, %ymm6
+
+// CHECK: vorps -4(%ebx,%ecx,8), %ymm2, %ymm5
+// CHECK: encoding: [0xc5,0xec,0x56,0x6c,0xcb,0xfc]
+ vorps -4(%ebx,%ecx,8), %ymm2, %ymm5
+
+// CHECK: vorpd -4(%ebx,%ecx,8), %ymm2, %ymm5
+// CHECK: encoding: [0xc5,0xed,0x56,0x6c,0xcb,0xfc]
+ vorpd -4(%ebx,%ecx,8), %ymm2, %ymm5
+
+// CHECK: vxorps %ymm2, %ymm4, %ymm6
+// CHECK: encoding: [0xc5,0xdc,0x57,0xf2]
+ vxorps %ymm2, %ymm4, %ymm6
+
+// CHECK: vxorpd %ymm2, %ymm4, %ymm6
+// CHECK: encoding: [0xc5,0xdd,0x57,0xf2]
+ vxorpd %ymm2, %ymm4, %ymm6
+
+// CHECK: vxorps -4(%ebx,%ecx,8), %ymm2, %ymm5
+// CHECK: encoding: [0xc5,0xec,0x57,0x6c,0xcb,0xfc]
+ vxorps -4(%ebx,%ecx,8), %ymm2, %ymm5
+
+// CHECK: vxorpd -4(%ebx,%ecx,8), %ymm2, %ymm5
+// CHECK: encoding: [0xc5,0xed,0x57,0x6c,0xcb,0xfc]
+ vxorpd -4(%ebx,%ecx,8), %ymm2, %ymm5
+
+// CHECK: vandnps %ymm2, %ymm4, %ymm6
+// CHECK: encoding: [0xc5,0xdc,0x55,0xf2]
+ vandnps %ymm2, %ymm4, %ymm6
+
+// CHECK: vandnpd %ymm2, %ymm4, %ymm6
+// CHECK: encoding: [0xc5,0xdd,0x55,0xf2]
+ vandnpd %ymm2, %ymm4, %ymm6
+
+// CHECK: vandnps -4(%ebx,%ecx,8), %ymm2, %ymm5
+// CHECK: encoding: [0xc5,0xec,0x55,0x6c,0xcb,0xfc]
+ vandnps -4(%ebx,%ecx,8), %ymm2, %ymm5
+
+// CHECK: vandnpd -4(%ebx,%ecx,8), %ymm2, %ymm5
+// CHECK: encoding: [0xc5,0xed,0x55,0x6c,0xcb,0xfc]
+ vandnpd -4(%ebx,%ecx,8), %ymm2, %ymm5
+
Modified: llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s?rev=108224&r1=108223&r2=108224&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s (original)
+++ llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Mon Jul 12 21:38:35 2010
@@ -2608,3 +2608,67 @@
// CHECK: encoding: [0xc5,0x7c,0x53,0x20]
vrcpps (%rax), %ymm12
+// CHECK: vandps %ymm12, %ymm14, %ymm11
+// CHECK: encoding: [0xc4,0x41,0x0c,0x54,0xdc]
+ vandps %ymm12, %ymm14, %ymm11
+
+// CHECK: vandpd %ymm12, %ymm14, %ymm11
+// CHECK: encoding: [0xc4,0x41,0x0d,0x54,0xdc]
+ vandpd %ymm12, %ymm14, %ymm11
+
+// CHECK: vandps -4(%rbx,%rcx,8), %ymm12, %ymm10
+// CHECK: encoding: [0xc5,0x1c,0x54,0x54,0xcb,0xfc]
+ vandps -4(%rbx,%rcx,8), %ymm12, %ymm10
+
+// CHECK: vandpd -4(%rbx,%rcx,8), %ymm12, %ymm10
+// CHECK: encoding: [0xc5,0x1d,0x54,0x54,0xcb,0xfc]
+ vandpd -4(%rbx,%rcx,8), %ymm12, %ymm10
+
+// CHECK: vorps %ymm12, %ymm14, %ymm11
+// CHECK: encoding: [0xc4,0x41,0x0c,0x56,0xdc]
+ vorps %ymm12, %ymm14, %ymm11
+
+// CHECK: vorpd %ymm12, %ymm14, %ymm11
+// CHECK: encoding: [0xc4,0x41,0x0d,0x56,0xdc]
+ vorpd %ymm12, %ymm14, %ymm11
+
+// CHECK: vorps -4(%rbx,%rcx,8), %ymm12, %ymm10
+// CHECK: encoding: [0xc5,0x1c,0x56,0x54,0xcb,0xfc]
+ vorps -4(%rbx,%rcx,8), %ymm12, %ymm10
+
+// CHECK: vorpd -4(%rbx,%rcx,8), %ymm12, %ymm10
+// CHECK: encoding: [0xc5,0x1d,0x56,0x54,0xcb,0xfc]
+ vorpd -4(%rbx,%rcx,8), %ymm12, %ymm10
+
+// CHECK: vxorps %ymm12, %ymm14, %ymm11
+// CHECK: encoding: [0xc4,0x41,0x0c,0x57,0xdc]
+ vxorps %ymm12, %ymm14, %ymm11
+
+// CHECK: vxorpd %ymm12, %ymm14, %ymm11
+// CHECK: encoding: [0xc4,0x41,0x0d,0x57,0xdc]
+ vxorpd %ymm12, %ymm14, %ymm11
+
+// CHECK: vxorps -4(%rbx,%rcx,8), %ymm12, %ymm10
+// CHECK: encoding: [0xc5,0x1c,0x57,0x54,0xcb,0xfc]
+ vxorps -4(%rbx,%rcx,8), %ymm12, %ymm10
+
+// CHECK: vxorpd -4(%rbx,%rcx,8), %ymm12, %ymm10
+// CHECK: encoding: [0xc5,0x1d,0x57,0x54,0xcb,0xfc]
+ vxorpd -4(%rbx,%rcx,8), %ymm12, %ymm10
+
+// CHECK: vandnps %ymm12, %ymm14, %ymm11
+// CHECK: encoding: [0xc4,0x41,0x0c,0x55,0xdc]
+ vandnps %ymm12, %ymm14, %ymm11
+
+// CHECK: vandnpd %ymm12, %ymm14, %ymm11
+// CHECK: encoding: [0xc4,0x41,0x0d,0x55,0xdc]
+ vandnpd %ymm12, %ymm14, %ymm11
+
+// CHECK: vandnps -4(%rbx,%rcx,8), %ymm12, %ymm10
+// CHECK: encoding: [0xc5,0x1c,0x55,0x54,0xcb,0xfc]
+ vandnps -4(%rbx,%rcx,8), %ymm12, %ymm10
+
+// CHECK: vandnpd -4(%rbx,%rcx,8), %ymm12, %ymm10
+// CHECK: encoding: [0xc5,0x1d,0x55,0x54,0xcb,0xfc]
+ vandnpd -4(%rbx,%rcx,8), %ymm12, %ymm10
+
More information about the llvm-commits
mailing list