From e706501975e6415daae830be563bdfdead095121 Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Tue, 20 Jul 2010 23:19:02 +0000 Subject: [PATCH] Add new AVX vextractf128 instructions llvm-svn: 108964 --- llvm/lib/Target/X86/X86InstrSSE.td | 10 ++++++++++ llvm/test/MC/AsmParser/X86/x86_32-encoding.s | 8 ++++++++ llvm/test/MC/AsmParser/X86/x86_64-encoding.s | 8 ++++++++ 3 files changed, 26 insertions(+) diff --git a/llvm/lib/Target/X86/X86InstrSSE.td b/llvm/lib/Target/X86/X86InstrSSE.td index ef3197b4bb90..01dfc12d039e 100644 --- a/llvm/lib/Target/X86/X86InstrSSE.td +++ b/llvm/lib/Target/X86/X86InstrSSE.td @@ -5008,4 +5008,14 @@ def VINSERTF128rm : AVXAIi8<0x18, MRMSrcMem, (outs VR256:$dst), "vinsertf128\t{$src3, $src2, $src1, $dst|$dst, $src1, $src2, $src3}", []>, VEX_4V; +// Extract packed floating-point values +def VEXTRACTF128rr : AVXAIi8<0x19, MRMDestReg, (outs VR128:$dst), + (ins VR256:$src1, i8imm:$src2), + "vextractf128\t{$src2, $src1, $dst|$dst, $src1, $src2}", + []>, VEX; +def VEXTRACTF128mr : AVXAIi8<0x19, MRMDestMem, (outs), + (ins f128mem:$dst, VR256:$src1, i8imm:$src2), + "vextractf128\t{$src2, $src1, $dst|$dst, $src1, $src2}", + []>, VEX; + } // isAsmParserOnly diff --git a/llvm/test/MC/AsmParser/X86/x86_32-encoding.s b/llvm/test/MC/AsmParser/X86/x86_32-encoding.s index 5b4e8f0e7e30..495e940c0f05 100644 --- a/llvm/test/MC/AsmParser/X86/x86_32-encoding.s +++ b/llvm/test/MC/AsmParser/X86/x86_32-encoding.s @@ -13022,3 +13022,11 @@ // CHECK: encoding: [0xc4,0xe3,0x6d,0x18,0x28,0x07] vinsertf128 $7, (%eax), %ymm2, %ymm5 +// CHECK: vextractf128 $7, %ymm2, %xmm2 +// CHECK: encoding: [0xc4,0xe3,0x7d,0x19,0xd2,0x07] + vextractf128 $7, %ymm2, %xmm2 + +// CHECK: vextractf128 $7, %ymm2, (%eax) +// CHECK: encoding: [0xc4,0xe3,0x7d,0x19,0x10,0x07] + vextractf128 $7, %ymm2, (%eax) + diff --git a/llvm/test/MC/AsmParser/X86/x86_64-encoding.s b/llvm/test/MC/AsmParser/X86/x86_64-encoding.s index e4eca51b0a56..bf232abe2a22 100644 --- a/llvm/test/MC/AsmParser/X86/x86_64-encoding.s +++ b/llvm/test/MC/AsmParser/X86/x86_64-encoding.s @@ -3096,3 +3096,11 @@ pshufb CPI1_0(%rip), %xmm1 // CHECK: encoding: [0xc4,0x63,0x1d,0x18,0x10,0x07] vinsertf128 $7, (%rax), %ymm12, %ymm10 +// CHECK: vextractf128 $7, %ymm12, %xmm12 +// CHECK: encoding: [0xc4,0x43,0x7d,0x19,0xe4,0x07] + vextractf128 $7, %ymm12, %xmm12 + +// CHECK: vextractf128 $7, %ymm12, (%rax) +// CHECK: encoding: [0xc4,0x63,0x7d,0x19,0x20,0x07] + vextractf128 $7, %ymm12, (%rax) +