diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-12-19 01:47:30 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-12-19 01:47:30 -0800 |
commit | e474079ddc1941246e000dc699f9acb5c6a8a5e0 (patch) | |
tree | 42048d3711a0becb1c31433b4692edf725174693 /src/arch/x86/insts | |
parent | 295516a590b6e47c9a881f193027447e500c749c (diff) | |
download | gem5-e474079ddc1941246e000dc699f9acb5c6a8a5e0.tar.xz |
X86: Create a common flag with a name to indicate scalar media instructions.
Diffstat (limited to 'src/arch/x86/insts')
-rw-r--r-- | src/arch/x86/insts/micromediaop.hh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/arch/x86/insts/micromediaop.hh b/src/arch/x86/insts/micromediaop.hh index 508ef4e26..f2871f67e 100644 --- a/src/arch/x86/insts/micromediaop.hh +++ b/src/arch/x86/insts/micromediaop.hh @@ -35,6 +35,10 @@ namespace X86ISA { + enum MediaFlag { + MediaScalarOp = 128 + }; + class MediaOpBase : public X86MicroopBase { protected: @@ -59,6 +63,18 @@ namespace X86ISA src1(_src1.idx), dest(_dest.idx), srcSize(_srcSize), destSize(_destSize), ext(_ext) {} + + bool + scalarOp() const + { + return ext & MediaScalarOp; + } + + int + numItems(int size) const + { + return scalarOp() ? 1 : (sizeof(FloatRegBits) / size); + } }; class MediaOpReg : public MediaOpBase |