[llvm-commits] [llvm] r107240 - 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
Tue Jun 29 19:21:09 PDT 2010
Author: bruno
Date: Tue Jun 29 21:21:09 2010
New Revision: 107240
URL: http://llvm.org/viewvc/llvm-project?rev=107240&view=rev
Log:
Add AVX SSE2 integer packed compare instructions
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=107240&r1=107239&r2=107240&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue Jun 29 21:21:09 2010
@@ -2576,6 +2576,23 @@
// SSE2 - Packed Integer Comparison Instructions
//===---------------------------------------------------------------------===//
+let isAsmParserOnly = 1, Predicates = [HasAVX, HasSSE2] in {
+ let isCommutable = 1 in {
+ defm VPCMPEQB : PDI_binop_rm_int<0x74, "vpcmpeqb", int_x86_sse2_pcmpeq_b, 0>,
+ VEX_4V;
+ defm VPCMPEQW : PDI_binop_rm_int<0x75, "vpcmpeqw", int_x86_sse2_pcmpeq_w, 0>,
+ VEX_4V;
+ defm VPCMPEQD : PDI_binop_rm_int<0x76, "vpcmpeqd", int_x86_sse2_pcmpeq_d, 0>,
+ VEX_4V;
+ }
+ defm VPCMPGTB : PDI_binop_rm_int<0x64, "vpcmpgtb", int_x86_sse2_pcmpgt_b, 0>,
+ VEX_4V;
+ defm VPCMPGTW : PDI_binop_rm_int<0x65, "vpcmpgtw", int_x86_sse2_pcmpgt_w, 0>,
+ VEX_4V;
+ defm VPCMPGTD : PDI_binop_rm_int<0x66, "vpcmpgtd", int_x86_sse2_pcmpgt_d, 0>,
+ VEX_4V;
+}
+
let Constraints = "$src1 = $dst" in {
let isCommutable = 1 in {
defm PCMPEQB : PDI_binop_rm_int<0x74, "pcmpeqb", int_x86_sse2_pcmpeq_b>;
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=107240&r1=107239&r2=107240&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s (original)
+++ llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Tue Jun 29 21:21:09 2010
@@ -11322,3 +11322,51 @@
// CHECK: encoding: [0xc5,0xe9,0xdf,0x18]
vpandn (%eax), %xmm2, %xmm3
+// CHECK: vpcmpeqb %xmm1, %xmm2, %xmm3
+// CHECK: encoding: [0xc5,0xe9,0x74,0xd9]
+ vpcmpeqb %xmm1, %xmm2, %xmm3
+
+// CHECK: vpcmpeqb (%eax), %xmm2, %xmm3
+// CHECK: encoding: [0xc5,0xe9,0x74,0x18]
+ vpcmpeqb (%eax), %xmm2, %xmm3
+
+// CHECK: vpcmpeqw %xmm1, %xmm2, %xmm3
+// CHECK: encoding: [0xc5,0xe9,0x75,0xd9]
+ vpcmpeqw %xmm1, %xmm2, %xmm3
+
+// CHECK: vpcmpeqw (%eax), %xmm2, %xmm3
+// CHECK: encoding: [0xc5,0xe9,0x75,0x18]
+ vpcmpeqw (%eax), %xmm2, %xmm3
+
+// CHECK: vpcmpeqd %xmm1, %xmm2, %xmm3
+// CHECK: encoding: [0xc5,0xe9,0x76,0xd9]
+ vpcmpeqd %xmm1, %xmm2, %xmm3
+
+// CHECK: vpcmpeqd (%eax), %xmm2, %xmm3
+// CHECK: encoding: [0xc5,0xe9,0x76,0x18]
+ vpcmpeqd (%eax), %xmm2, %xmm3
+
+// CHECK: vpcmpgtb %xmm1, %xmm2, %xmm3
+// CHECK: encoding: [0xc5,0xe9,0x64,0xd9]
+ vpcmpgtb %xmm1, %xmm2, %xmm3
+
+// CHECK: vpcmpgtb (%eax), %xmm2, %xmm3
+// CHECK: encoding: [0xc5,0xe9,0x64,0x18]
+ vpcmpgtb (%eax), %xmm2, %xmm3
+
+// CHECK: vpcmpgtw %xmm1, %xmm2, %xmm3
+// CHECK: encoding: [0xc5,0xe9,0x65,0xd9]
+ vpcmpgtw %xmm1, %xmm2, %xmm3
+
+// CHECK: vpcmpgtw (%eax), %xmm2, %xmm3
+// CHECK: encoding: [0xc5,0xe9,0x65,0x18]
+ vpcmpgtw (%eax), %xmm2, %xmm3
+
+// CHECK: vpcmpgtd %xmm1, %xmm2, %xmm3
+// CHECK: encoding: [0xc5,0xe9,0x66,0xd9]
+ vpcmpgtd %xmm1, %xmm2, %xmm3
+
+// CHECK: vpcmpgtd (%eax), %xmm2, %xmm3
+// CHECK: encoding: [0xc5,0xe9,0x66,0x18]
+ vpcmpgtd (%eax), %xmm2, %xmm3
+
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=107240&r1=107239&r2=107240&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s (original)
+++ llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Tue Jun 29 21:21:09 2010
@@ -1362,3 +1362,51 @@
// CHECK: encoding: [0xc5,0x19,0xdf,0x28]
vpandn (%rax), %xmm12, %xmm13
+// CHECK: vpcmpeqb %xmm11, %xmm12, %xmm13
+// CHECK: encoding: [0xc4,0x41,0x19,0x74,0xeb]
+ vpcmpeqb %xmm11, %xmm12, %xmm13
+
+// CHECK: vpcmpeqb (%rax), %xmm12, %xmm13
+// CHECK: encoding: [0xc5,0x19,0x74,0x28]
+ vpcmpeqb (%rax), %xmm12, %xmm13
+
+// CHECK: vpcmpeqw %xmm11, %xmm12, %xmm13
+// CHECK: encoding: [0xc4,0x41,0x19,0x75,0xeb]
+ vpcmpeqw %xmm11, %xmm12, %xmm13
+
+// CHECK: vpcmpeqw (%rax), %xmm12, %xmm13
+// CHECK: encoding: [0xc5,0x19,0x75,0x28]
+ vpcmpeqw (%rax), %xmm12, %xmm13
+
+// CHECK: vpcmpeqd %xmm11, %xmm12, %xmm13
+// CHECK: encoding: [0xc4,0x41,0x19,0x76,0xeb]
+ vpcmpeqd %xmm11, %xmm12, %xmm13
+
+// CHECK: vpcmpeqd (%rax), %xmm12, %xmm13
+// CHECK: encoding: [0xc5,0x19,0x76,0x28]
+ vpcmpeqd (%rax), %xmm12, %xmm13
+
+// CHECK: vpcmpgtb %xmm11, %xmm12, %xmm13
+// CHECK: encoding: [0xc4,0x41,0x19,0x64,0xeb]
+ vpcmpgtb %xmm11, %xmm12, %xmm13
+
+// CHECK: vpcmpgtb (%rax), %xmm12, %xmm13
+// CHECK: encoding: [0xc5,0x19,0x64,0x28]
+ vpcmpgtb (%rax), %xmm12, %xmm13
+
+// CHECK: vpcmpgtw %xmm11, %xmm12, %xmm13
+// CHECK: encoding: [0xc4,0x41,0x19,0x65,0xeb]
+ vpcmpgtw %xmm11, %xmm12, %xmm13
+
+// CHECK: vpcmpgtw (%rax), %xmm12, %xmm13
+// CHECK: encoding: [0xc5,0x19,0x65,0x28]
+ vpcmpgtw (%rax), %xmm12, %xmm13
+
+// CHECK: vpcmpgtd %xmm11, %xmm12, %xmm13
+// CHECK: encoding: [0xc4,0x41,0x19,0x66,0xeb]
+ vpcmpgtd %xmm11, %xmm12, %xmm13
+
+// CHECK: vpcmpgtd (%rax), %xmm12, %xmm13
+// CHECK: encoding: [0xc5,0x19,0x66,0x28]
+ vpcmpgtd (%rax), %xmm12, %xmm13
+
More information about the llvm-commits
mailing list