From df1b3fdcfba3039122d8b2ded5e64200fec6eebd Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 17 Aug 2009 18:50:29 -0700 Subject: [PATCH] X86: Implement the MOVDDUP instruction. --- src/arch/x86/isa/decoder/two_byte_opcodes.isa | 2 +- .../data_transfer/move_with_duplication.py | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa index 96a030e61..b841a8183 100644 --- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa @@ -326,7 +326,7 @@ 0x8: decode OPCODE_OP_BOTTOM3 { 0x0: Inst::MOVSD(Vq,Wq); 0x1: Inst::MOVSD(Wq,Vq); - 0x2: movddup_Vo_Wq(); + 0x2: Inst::MOVDDUP(Vo,Wq); default: Inst::UD2(); } default: Inst::UD2(); diff --git a/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move_with_duplication.py b/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move_with_duplication.py index 096708393..539edfd74 100644 --- a/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move_with_duplication.py +++ b/src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move_with_duplication.py @@ -54,7 +54,22 @@ # Authors: Gabe Black microcode = ''' -# MOVDDUP +def macroop MOVDDUP_XMM_XMM { + movfp xmmh, xmmlm, dataSize=8 + movfp xmml, xmmlm, dataSize=8 +}; + +def macroop MOVDDUP_XMM_M { + ldfp xmml, seg, sib, disp, dataSize=8 + movfp xmmh, xmml, dataSize=8 +}; + +def macroop MOVDDUP_XMM_P { + rdip t7 + ldfp xmml, seg, riprel, disp, dataSize=8 + movfp xmmh, xmml, dataSize=8 +}; + # MOVSLDUP # MOVSHDUP '''