micromediaop.hh (6545:9c68aea7b1e6) | micromediaop.hh (6799:36131e4dfb6e) |
---|---|
1/* 2 * Copyright (c) 2009 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 21 unchanged lines hidden (view full) --- 30 31#ifndef __ARCH_X86_INSTS_MICROMEDIAOP_HH__ 32#define __ARCH_X86_INSTS_MICROMEDIAOP_HH__ 33 34#include "arch/x86/insts/microop.hh" 35 36namespace X86ISA 37{ | 1/* 2 * Copyright (c) 2009 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 21 unchanged lines hidden (view full) --- 30 31#ifndef __ARCH_X86_INSTS_MICROMEDIAOP_HH__ 32#define __ARCH_X86_INSTS_MICROMEDIAOP_HH__ 33 34#include "arch/x86/insts/microop.hh" 35 36namespace X86ISA 37{ |
38 enum MediaFlag { 39 MediaScalarOp = 128 40 }; 41 |
|
38 class MediaOpBase : public X86MicroopBase 39 { 40 protected: 41 const RegIndex src1; 42 const RegIndex dest; 43 const uint8_t srcSize; 44 const uint8_t destSize; 45 const uint8_t ext; --- 8 unchanged lines hidden (view full) --- 54 uint8_t _srcSize, uint8_t _destSize, uint8_t _ext, 55 OpClass __opClass) : 56 X86MicroopBase(_machInst, mnem, _instMnem, 57 isMicro, isDelayed, isFirst, isLast, 58 __opClass), 59 src1(_src1.idx), dest(_dest.idx), 60 srcSize(_srcSize), destSize(_destSize), ext(_ext) 61 {} | 42 class MediaOpBase : public X86MicroopBase 43 { 44 protected: 45 const RegIndex src1; 46 const RegIndex dest; 47 const uint8_t srcSize; 48 const uint8_t destSize; 49 const uint8_t ext; --- 8 unchanged lines hidden (view full) --- 58 uint8_t _srcSize, uint8_t _destSize, uint8_t _ext, 59 OpClass __opClass) : 60 X86MicroopBase(_machInst, mnem, _instMnem, 61 isMicro, isDelayed, isFirst, isLast, 62 __opClass), 63 src1(_src1.idx), dest(_dest.idx), 64 srcSize(_srcSize), destSize(_destSize), ext(_ext) 65 {} |
66 67 bool 68 scalarOp() const 69 { 70 return ext & MediaScalarOp; 71 } 72 73 int 74 numItems(int size) const 75 { 76 return scalarOp() ? 1 : (sizeof(FloatRegBits) / size); 77 } |
|
62 }; 63 64 class MediaOpReg : public MediaOpBase 65 { 66 protected: 67 const RegIndex src2; 68 69 // Constructor --- 44 unchanged lines hidden --- | 78 }; 79 80 class MediaOpReg : public MediaOpBase 81 { 82 protected: 83 const RegIndex src2; 84 85 // Constructor --- 44 unchanged lines hidden --- |