diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 20:15:16 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 20:15:16 -0700 |
commit | dabbc7d9d3d6fc188212306cd28b55fdfd2b56bd (patch) | |
tree | 9f836b28e1017c9e6bdac3e4d53da99317b22dfd /src/arch/x86 | |
parent | 470dcef22920765a45b2bea77e26df57e8d3eef6 (diff) | |
download | gem5-dabbc7d9d3d6fc188212306cd28b55fdfd2b56bd.tar.xz |
X86: Implement the sum of absolute differences instructions.
Diffstat (limited to 'src/arch/x86')
3 files changed, 35 insertions, 4 deletions
diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa index 906516b86..315705200 100644 --- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa +++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa @@ -1073,7 +1073,7 @@ 0x3: psllq_Pq_Qq(); 0x4: Inst::PMULUDQ(Pq,Qq); 0x5: pmaddwd_Pq_Qq(); - 0x6: psadbw_Pq_Qq(); + 0x6: Inst::PSADBW(Pq,Qq); 0x7: maskmovq_Pq_PRq(); default: Inst::UD2(); } @@ -1084,7 +1084,7 @@ 0x3: psllq_Vo_Wo(); 0x4: Inst::PMULUDQ(Vo,Wo); 0x5: pmaddwd_Vo_Wo(); - 0x6: psadbw_Vo_Wo(); + 0x6: Inst::PSADBW(Vo,Wo); 0x7: maskmovdqu_Vo_VRo(); default: Inst::UD2(); } diff --git a/src/arch/x86/isa/insts/simd128/integer/arithmetic/sum_of_absolute_differences.py b/src/arch/x86/isa/insts/simd128/integer/arithmetic/sum_of_absolute_differences.py index df1ca2301..ef3758e49 100644 --- a/src/arch/x86/isa/insts/simd128/integer/arithmetic/sum_of_absolute_differences.py +++ b/src/arch/x86/isa/insts/simd128/integer/arithmetic/sum_of_absolute_differences.py @@ -54,5 +54,23 @@ # Authors: Gabe Black microcode = ''' -# PSADBW +def macroop PSADBW_XMM_XMM { + msad xmml, xmml, xmmlm, srcSize=1, destSize=2 + msad xmmh, xmmh, xmmhm, srcSize=1, destSize=2 +}; + +def macroop PSADBW_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + msad xmml, xmml, ufp1, srcSize=1, destSize=2 + msad xmmh, xmmh, ufp2, srcSize=1, destSize=2 +}; + +def macroop PSADBW_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + msad xmml, xmml, ufp1, srcSize=1, destSize=2 + msad xmmh, xmmh, ufp2, srcSize=1, destSize=2 +}; ''' diff --git a/src/arch/x86/isa/insts/simd64/integer/arithmetic/sum_of_absolute_differences.py b/src/arch/x86/isa/insts/simd64/integer/arithmetic/sum_of_absolute_differences.py index df1ca2301..8c3c239bd 100644 --- a/src/arch/x86/isa/insts/simd64/integer/arithmetic/sum_of_absolute_differences.py +++ b/src/arch/x86/isa/insts/simd64/integer/arithmetic/sum_of_absolute_differences.py @@ -54,5 +54,18 @@ # Authors: Gabe Black microcode = ''' -# PSADBW +def macroop PSADBW_MMX_MMX { + msad mmx, mmx, mmxm, srcSize=1, destSize=2 +}; + +def macroop PSADBW_MMX_M { + ldfp ufp1, seg, sib, disp, dataSize=8 + msad mmx, mmx, ufp1, srcSize=1, destSize=2 +}; + +def macroop PSADBW_MMX_P { + rdip t7 + ldfp ufp1, seg, riprel, disp, dataSize=8 + msad mmx, mmx, ufp1, srcSize=1, destSize=2 +}; ''' |