From 4c23e631f26f4195212df94684b347fe3639d3fe Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 17 Aug 2009 20:22:56 -0700 Subject: X86: Implement the insert/extract instructions. --- .../integer/data_reordering/extract_and_insert.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/arch/x86/isa/insts/simd64') diff --git a/src/arch/x86/isa/insts/simd64/integer/data_reordering/extract_and_insert.py b/src/arch/x86/isa/insts/simd64/integer/data_reordering/extract_and_insert.py index 80f7a3e71..c9ebbcf14 100644 --- a/src/arch/x86/isa/insts/simd64/integer/data_reordering/extract_and_insert.py +++ b/src/arch/x86/isa/insts/simd64/integer/data_reordering/extract_and_insert.py @@ -54,6 +54,22 @@ # Authors: Gabe Black microcode = ''' -# PEXTRW -# PINSRW +def macroop PEXTRW_R_MMX_I { + mov2int reg, mmxm, "IMMEDIATE & mask(2)", size=2, ext=0 +}; + +def macroop PINSRW_MMX_R_I { + mov2fp mmx, regm, "IMMEDIATE & mask(2)", size=2, ext=0 +}; + +def macroop PINSRW_MMX_M_I { + ld t1, seg, sib, disp, dataSize=2 + mov2fp mmx, t1, "IMMEDIATE & mask(2)", size=2, ext=0 +}; + +def macroop PINSRW_MMX_P_I { + rdip t7 + ld t1, seg, riprel, disp, dataSize=2 + mov2fp mmx, t1, "IMMEDIATE & mask(2)", size=2, ext=0 +}; ''' -- cgit v1.2.3