[llvm-commits] [llvm] r107740 - 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 Jul 6 17:07:24 PDT 2010
Author: bruno
Date: Tue Jul 6 19:07:24 2010
New Revision: 107740
URL: http://llvm.org/viewvc/llvm-project?rev=107740&view=rev
Log:
Add AVX SSE4.1 Extract Integer 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=107740&r1=107739&r2=107740&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Tue Jul 6 19:07:24 2010
@@ -4450,6 +4450,9 @@
// (store (i8 (trunc (X86pextrb (v16i8 VR128:$src1), imm:$src2))), addr:$dst)
}
+let isAsmParserOnly = 1, Predicates = [HasAVX, HasSSE41] in
+ defm VPEXTRB : SS41I_extract8<0x14, "vpextrb">, VEX;
+
defm PEXTRB : SS41I_extract8<0x14, "pextrb">;
@@ -4465,6 +4468,9 @@
// (store (i16 (trunc (X86pextrw (v16i8 VR128:$src1), imm:$src2))), addr:$dst)
}
+let isAsmParserOnly = 1, Predicates = [HasAVX, HasSSE41] in
+ defm VPEXTRW : SS41I_extract16<0x15, "vpextrw">, VEX;
+
defm PEXTRW : SS41I_extract16<0x15, "pextrw">;
@@ -4484,8 +4490,13 @@
addr:$dst)]>, OpSize;
}
+let isAsmParserOnly = 1, Predicates = [HasAVX, HasSSE41] in
+ defm VPEXTRD : SS41I_extract32<0x16, "vpextrd">, VEX;
+
defm PEXTRD : SS41I_extract32<0x16, "pextrd">;
+let isAsmParserOnly = 1, Predicates = [HasAVX, HasSSE41] in
+ defm VPEXTRQ : SS41I_extract64<0x16, "vpextrq">, VEX, VEX_W;
/// SS41I_extractf32 - SSE 4.1 extract 32 bits fp value to int reg or memory
/// destination
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=107740&r1=107739&r2=107740&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s (original)
+++ llvm/trunk/test/MC/AsmParser/X86/x86_32-encoding.s Tue Jul 6 19:07:24 2010
@@ -12046,3 +12046,27 @@
// CHECK: encoding: [0xc4,0xe2,0x79,0x34,0x10]
vpmovzxwq (%eax), %xmm2
+// CHECK: vpextrw $7, %xmm2, %eax
+// CHECK: encoding: [0xc5,0xf9,0xc5,0xc2,0x07]
+ vpextrw $7, %xmm2, %eax
+
+// CHECK: vpextrw $7, %xmm2, (%eax)
+// CHECK: encoding: [0xc4,0xe3,0x79,0x15,0x10,0x07]
+ vpextrw $7, %xmm2, (%eax)
+
+// CHECK: vpextrd $7, %xmm2, %eax
+// CHECK: encoding: [0xc4,0xe3,0x79,0x16,0xd0,0x07]
+ vpextrd $7, %xmm2, %eax
+
+// CHECK: vpextrd $7, %xmm2, (%eax)
+// CHECK: encoding: [0xc4,0xe3,0x79,0x16,0x10,0x07]
+ vpextrd $7, %xmm2, (%eax)
+
+// CHECK: vpextrb $7, %xmm2, %eax
+// CHECK: encoding: [0xc4,0xe3,0x79,0x14,0xd0,0x07]
+ vpextrb $7, %xmm2, %eax
+
+// CHECK: vpextrb $7, %xmm2, (%eax)
+// CHECK: encoding: [0xc4,0xe3,0x79,0x14,0x10,0x07]
+ vpextrb $7, %xmm2, (%eax)
+
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=107740&r1=107739&r2=107740&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s (original)
+++ llvm/trunk/test/MC/AsmParser/X86/x86_64-encoding.s Tue Jul 6 19:07:24 2010
@@ -2094,3 +2094,35 @@
// CHECK: encoding: [0xc4,0x62,0x79,0x34,0x20]
vpmovzxwq (%rax), %xmm12
+// CHECK: vpextrw $7, %xmm12, %eax
+// CHECK: encoding: [0xc4,0xc1,0x79,0xc5,0xc4,0x07]
+ vpextrw $7, %xmm12, %eax
+
+// CHECK: vpextrw $7, %xmm12, (%rax)
+// CHECK: encoding: [0xc4,0x63,0x79,0x15,0x20,0x07]
+ vpextrw $7, %xmm12, (%rax)
+
+// CHECK: vpextrd $7, %xmm12, %eax
+// CHECK: encoding: [0xc4,0x63,0x79,0x16,0xe0,0x07]
+ vpextrd $7, %xmm12, %eax
+
+// CHECK: vpextrd $7, %xmm12, (%rax)
+// CHECK: encoding: [0xc4,0x63,0x79,0x16,0x20,0x07]
+ vpextrd $7, %xmm12, (%rax)
+
+// CHECK: vpextrb $7, %xmm12, %eax
+// CHECK: encoding: [0xc4,0x63,0x79,0x14,0xe0,0x07]
+ vpextrb $7, %xmm12, %eax
+
+// CHECK: vpextrb $7, %xmm12, (%rax)
+// CHECK: encoding: [0xc4,0x63,0x79,0x14,0x20,0x07]
+ vpextrb $7, %xmm12, (%rax)
+
+// CHECK: vpextrq $7, %xmm12, %rcx
+// CHECK: encoding: [0xc4,0x63,0xf9,0x16,0xe1,0x07]
+ vpextrq $7, %xmm12, %rcx
+
+// CHECK: vpextrq $7, %xmm12, (%rcx)
+// CHECK: encoding: [0xc4,0x63,0xf9,0x16,0x21,0x07]
+ vpextrq $7, %xmm12, (%rcx)
+
More information about the llvm-commits
mailing list