From ae4ee21ecd65107a96fe22692ed5d2ea39b873b5 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 17 Aug 2009 18:18:19 -0700 Subject: [PATCH] X86: Implement the versions of PUNPCKLBW that use XMM registers. --- src/arch/x86/isa/decoder/two_byte_opcodes.isa | 2 +- .../data_reordering/unpack_and_interleave.py | 20 +++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa index 75312ff45..6b24b3826 100644 --- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa @@ -562,7 +562,7 @@ } // operand size (0x66) 0x1: decode OPCODE_OP_BOTTOM3 { - 0x0: punpcklbw_Vo_Wq(); + 0x0: Inst::PUNPCKLBW(Vo,Wq); 0x1: punpcklwd_Vo_Wq(); 0x2: punpckldq_Vo_Wq(); 0x3: packsswb_Vo_Wo(); diff --git a/src/arch/x86/isa/insts/simd128/integer/data_reordering/unpack_and_interleave.py b/src/arch/x86/isa/insts/simd128/integer/data_reordering/unpack_and_interleave.py index e8c22ea9f..96419b1ad 100644 --- a/src/arch/x86/isa/insts/simd128/integer/data_reordering/unpack_and_interleave.py +++ b/src/arch/x86/isa/insts/simd128/integer/data_reordering/unpack_and_interleave.py @@ -54,12 +54,28 @@ # Authors: Gabe Black microcode = ''' +def macroop PUNPCKLBW_XMM_XMM { + unpack xmmh, xmml, xmmlm, sel=1, size=1 + unpack xmml, xmml, xmmlm, sel=0, size=1 +}; + +def macroop PUNPCKLBW_XMM_M { + ldfp ufp1, seg, sib, disp, dataSize=8 + unpack xmmh, xmml, ufp1, sel=1, size=1 + unpack xmml, xmml, ufp1, sel=0, size=1 +}; + +def macroop PUNPCKLBW_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, disp, dataSize=8 + unpack xmmh, xmml, ufp1, sel=1, size=1 + unpack xmml, xmml, ufp1, sel=0, size=1 +}; +''' # PUNPCKHBW # PUNPCKHWD # PUNPCKHDQ # PUNPCKHQDQ -# PUNPCKLBW # PUNPCKLWD # PUNPCKLDQ # PUNPCKLQDQ -''' -- 2.30.2