summaryrefslogtreecommitdiff
path: root/src/arch/x86/insts
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/insts')
-rw-r--r--src/arch/x86/insts/micromediaop.hh16
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