summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/microops
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-08-23 09:44:19 -0700
committerGabe Black <gblack@eecs.umich.edu>2010-08-23 09:44:19 -0700
commit9581562e653f6df810e40c076bc97d50daccf302 (patch)
treecda56ce9cae5dfed609c9d3704b6b47cae4a791a /src/arch/x86/isa/microops
parentf6182f948bdc05f3d0949627378ac5d15eea8e58 (diff)
downloadgem5-9581562e653f6df810e40c076bc97d50daccf302.tar.xz
X86: Get rid of the flagless microop constructor.
This will reduce clutter in the source and hopefully speed up compilation.
Diffstat (limited to 'src/arch/x86/isa/microops')
-rw-r--r--src/arch/x86/isa/microops/debug.isa32
-rw-r--r--src/arch/x86/isa/microops/fpop.isa27
-rw-r--r--src/arch/x86/isa/microops/ldstop.isa45
-rw-r--r--src/arch/x86/isa/microops/limmop.isa24
-rw-r--r--src/arch/x86/isa/microops/mediaop.isa54
-rw-r--r--src/arch/x86/isa/microops/regop.isa54
-rw-r--r--src/arch/x86/isa/microops/seqop.isa29
-rw-r--r--src/arch/x86/isa/microops/specop.isa37
8 files changed, 11 insertions, 291 deletions
diff --git a/src/arch/x86/isa/microops/debug.isa b/src/arch/x86/isa/microops/debug.isa
index 12a96c91d..4b2ecdd5a 100644
--- a/src/arch/x86/isa/microops/debug.isa
+++ b/src/arch/x86/isa/microops/debug.isa
@@ -53,9 +53,6 @@ output header {{
const char * instMnem, uint64_t setFlags,
std::string _message, uint8_t _cc);
- MicroDebugBase(ExtMachInst _machInst, const char * mnem,
- const char * instMnem, std::string _message, uint8_t _cc);
-
std::string generateDisassembly(Addr pc,
const SymbolTable *symtab) const;
};
@@ -64,15 +61,10 @@ output header {{
def template MicroDebugDeclare {{
class %(class_name)s : public %(base_class)s
{
- private:
- void buildMe();
public:
%(class_name)s(ExtMachInst _machInst, const char * instMnem,
uint64_t setFlags, std::string _message, uint8_t _cc);
- %(class_name)s(ExtMachInst _machInst, const char * instMnem,
- std::string _message, uint8_t _cc);
-
%(BasicExecDeclare)s
};
}};
@@ -93,14 +85,6 @@ def template MicroDebugExecute {{
output decoder {{
inline MicroDebugBase::MicroDebugBase(
ExtMachInst machInst, const char * mnem, const char * instMnem,
- std::string _message, uint8_t _cc) :
- X86MicroopBase(machInst, mnem, instMnem, 0, No_OpClass),
- message(_message), cc(_cc)
- {
- }
-
- inline MicroDebugBase::MicroDebugBase(
- ExtMachInst machInst, const char * mnem, const char * instMnem,
uint64_t setFlags, std::string _message, uint8_t _cc) :
X86MicroopBase(machInst, mnem, instMnem,
setFlags, No_OpClass),
@@ -110,27 +94,13 @@ output decoder {{
}};
def template MicroDebugConstructor {{
-
- inline void %(class_name)s::buildMe()
- {
- %(constructor)s;
- }
-
- inline %(class_name)s::%(class_name)s(
- ExtMachInst machInst, const char * instMnem,
- std::string _message, uint8_t _cc) :
- %(base_class)s(machInst, "%(func)s", instMnem, _message, _cc)
- {
- buildMe();
- }
-
inline %(class_name)s::%(class_name)s(
ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
std::string _message, uint8_t _cc) :
%(base_class)s(machInst, "%(func)s", instMnem,
setFlags, _message, _cc)
{
- buildMe();
+ %(constructor)s;
}
}};
diff --git a/src/arch/x86/isa/microops/fpop.isa b/src/arch/x86/isa/microops/fpop.isa
index bbd1e7a9f..4e62521e8 100644
--- a/src/arch/x86/isa/microops/fpop.isa
+++ b/src/arch/x86/isa/microops/fpop.isa
@@ -74,42 +74,17 @@ def template MicroFpOpExecute {{
def template MicroFpOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- void buildMe();
-
public:
%(class_name)s(ExtMachInst _machInst,
const char * instMnem, uint64_t setFlags,
InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
uint8_t _dataSize, int8_t _spm);
- %(class_name)s(ExtMachInst _machInst,
- const char * instMnem,
- InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
- uint8_t _dataSize, int8_t _spm);
-
%(BasicExecDeclare)s
};
}};
def template MicroFpOpConstructor {{
-
- inline void %(class_name)s::buildMe()
- {
- %(constructor)s;
- }
-
- inline %(class_name)s::%(class_name)s(
- ExtMachInst machInst, const char * instMnem,
- InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
- uint8_t _dataSize, int8_t _spm) :
- %(base_class)s(machInst, "%(mnemonic)s", instMnem, 0,
- _src1, _src2, _dest, _dataSize, _spm,
- %(op_class)s)
- {
- buildMe();
- }
-
inline %(class_name)s::%(class_name)s(
ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
@@ -118,7 +93,7 @@ def template MicroFpOpConstructor {{
_src1, _src2, _dest, _dataSize, _spm,
%(op_class)s)
{
- buildMe();
+ %(constructor)s;
}
}};
diff --git a/src/arch/x86/isa/microops/ldstop.isa b/src/arch/x86/isa/microops/ldstop.isa
index 04c973883..089f09ffb 100644
--- a/src/arch/x86/isa/microops/ldstop.isa
+++ b/src/arch/x86/isa/microops/ldstop.isa
@@ -71,9 +71,6 @@ def template MicroLeaExecute {{
def template MicroLeaDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- void buildMe();
-
public:
%(class_name)s(ExtMachInst _machInst,
const char * instMnem, uint64_t setFlags,
@@ -83,14 +80,6 @@ def template MicroLeaDeclare {{
uint8_t _dataSize, uint8_t _addressSize,
Request::FlagsType _memFlags);
- %(class_name)s(ExtMachInst _machInst,
- const char * instMnem,
- uint8_t _scale, InstRegIndex _index, InstRegIndex _base,
- uint64_t _disp, InstRegIndex _segment,
- InstRegIndex _data,
- uint8_t _dataSize, uint8_t _addressSize,
- Request::FlagsType _memFlags);
-
%(BasicExecDeclare)s
};
}};
@@ -246,9 +235,6 @@ def template CompleteAccDeclare {{
def template MicroLdStOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- void buildMe();
-
public:
%(class_name)s(ExtMachInst _machInst,
const char * instMnem, uint64_t setFlags,
@@ -258,14 +244,6 @@ def template MicroLdStOpDeclare {{
uint8_t _dataSize, uint8_t _addressSize,
Request::FlagsType _memFlags);
- %(class_name)s(ExtMachInst _machInst,
- const char * instMnem,
- uint8_t _scale, InstRegIndex _index, InstRegIndex _base,
- uint64_t _disp, InstRegIndex _segment,
- InstRegIndex _data,
- uint8_t _dataSize, uint8_t _addressSize,
- Request::FlagsType _memFlags);
-
%(BasicExecDeclare)s
%(InitiateAccDeclare)s
@@ -275,27 +253,6 @@ def template MicroLdStOpDeclare {{
}};
def template MicroLdStOpConstructor {{
-
- inline void %(class_name)s::buildMe()
- {
- %(constructor)s;
- }
-
- inline %(class_name)s::%(class_name)s(
- ExtMachInst machInst, const char * instMnem,
- uint8_t _scale, InstRegIndex _index, InstRegIndex _base,
- uint64_t _disp, InstRegIndex _segment,
- InstRegIndex _data,
- uint8_t _dataSize, uint8_t _addressSize,
- Request::FlagsType _memFlags) :
- %(base_class)s(machInst, "%(mnemonic)s", instMnem, 0,
- _scale, _index, _base,
- _disp, _segment, _data,
- _dataSize, _addressSize, _memFlags, %(op_class)s)
- {
- buildMe();
- }
-
inline %(class_name)s::%(class_name)s(
ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
uint8_t _scale, InstRegIndex _index, InstRegIndex _base,
@@ -308,7 +265,7 @@ def template MicroLdStOpConstructor {{
_disp, _segment, _data,
_dataSize, _addressSize, _memFlags, %(op_class)s)
{
- buildMe();
+ %(constructor)s;
}
}};
diff --git a/src/arch/x86/isa/microops/limmop.isa b/src/arch/x86/isa/microops/limmop.isa
index d80a9b9fa..2871d5a89 100644
--- a/src/arch/x86/isa/microops/limmop.isa
+++ b/src/arch/x86/isa/microops/limmop.isa
@@ -61,7 +61,6 @@ def template MicroLimmOpDeclare {{
const uint64_t imm;
const uint8_t dataSize;
RegIndex foldOBit;
- void buildMe();
std::string generateDisassembly(Addr pc,
const SymbolTable *symtab) const;
@@ -72,10 +71,6 @@ def template MicroLimmOpDeclare {{
uint64_t setFlags, InstRegIndex _dest,
uint64_t _imm, uint8_t _dataSize);
- %(class_name)s(ExtMachInst _machInst,
- const char * instMnem,
- InstRegIndex _dest, uint64_t _imm, uint8_t _dataSize);
-
%(BasicExecDeclare)s
};
}};
@@ -95,22 +90,6 @@ def template MicroLimmOpDisassembly {{
}};
def template MicroLimmOpConstructor {{
-
- inline void %(class_name)s::buildMe()
- {
- foldOBit = (dataSize == 1 && !machInst.rex.present) ? 1 << 6 : 0;
- %(constructor)s;
- }
-
- inline %(class_name)s::%(class_name)s(
- ExtMachInst machInst, const char * instMnem,
- InstRegIndex _dest, uint64_t _imm, uint8_t _dataSize) :
- %(base_class)s(machInst, "%(mnemonic)s", instMnem, 0, %(op_class)s),
- dest(_dest.idx), imm(_imm), dataSize(_dataSize)
- {
- buildMe();
- }
-
inline %(class_name)s::%(class_name)s(
ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
InstRegIndex _dest, uint64_t _imm, uint8_t _dataSize) :
@@ -118,7 +97,8 @@ def template MicroLimmOpConstructor {{
setFlags, %(op_class)s),
dest(_dest.idx), imm(_imm), dataSize(_dataSize)
{
- buildMe();
+ foldOBit = (dataSize == 1 && !machInst.rex.present) ? 1 << 6 : 0;
+ %(constructor)s;
}
}};
diff --git a/src/arch/x86/isa/microops/mediaop.isa b/src/arch/x86/isa/microops/mediaop.isa
index b36220d14..95864c16d 100644
--- a/src/arch/x86/isa/microops/mediaop.isa
+++ b/src/arch/x86/isa/microops/mediaop.isa
@@ -49,20 +49,12 @@ def template MediaOpExecute {{
def template MediaOpRegDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- void buildMe();
-
public:
%(class_name)s(ExtMachInst _machInst,
const char * instMnem, uint64_t setFlags,
InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
uint8_t _srcSize, uint8_t _destSize, uint16_t _ext);
- %(class_name)s(ExtMachInst _machInst,
- const char * instMnem,
- InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
- uint8_t _srcSize, uint8_t _destSize, uint16_t _ext);
-
%(BasicExecDeclare)s
};
}};
@@ -71,42 +63,17 @@ def template MediaOpImmDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- void buildMe();
-
public:
%(class_name)s(ExtMachInst _machInst,
const char * instMnem, uint64_t setFlags,
InstRegIndex _src1, uint16_t _imm8, InstRegIndex _dest,
uint8_t _srcSize, uint8_t _destSize, uint16_t _ext);
- %(class_name)s(ExtMachInst _machInst,
- const char * instMnem,
- InstRegIndex _src1, uint16_t _imm8, InstRegIndex _dest,
- uint8_t _srcSize, uint8_t _destSize, uint16_t _ext);
-
%(BasicExecDeclare)s
};
}};
def template MediaOpRegConstructor {{
-
- inline void %(class_name)s::buildMe()
- {
- %(constructor)s;
- }
-
- inline %(class_name)s::%(class_name)s(
- ExtMachInst machInst, const char * instMnem,
- InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
- uint8_t _srcSize, uint8_t _destSize, uint16_t _ext) :
- %(base_class)s(machInst, "%(mnemonic)s", instMnem, 0,
- _src1, _src2, _dest, _srcSize, _destSize, _ext,
- %(op_class)s)
- {
- buildMe();
- }
-
inline %(class_name)s::%(class_name)s(
ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
@@ -115,28 +82,11 @@ def template MediaOpRegConstructor {{
_src1, _src2, _dest, _srcSize, _destSize, _ext,
%(op_class)s)
{
- buildMe();
+ %(constructor)s;
}
}};
def template MediaOpImmConstructor {{
-
- inline void %(class_name)s::buildMe()
- {
- %(constructor)s;
- }
-
- inline %(class_name)s::%(class_name)s(
- ExtMachInst machInst, const char * instMnem,
- InstRegIndex _src1, uint16_t _imm8, InstRegIndex _dest,
- uint8_t _srcSize, uint8_t _destSize, uint16_t _ext) :
- %(base_class)s(machInst, "%(mnemonic)s", instMnem, 0,
- _src1, _imm8, _dest, _srcSize, _destSize, _ext,
- %(op_class)s)
- {
- buildMe();
- }
-
inline %(class_name)s::%(class_name)s(
ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
InstRegIndex _src1, uint16_t _imm8, InstRegIndex _dest,
@@ -145,7 +95,7 @@ def template MediaOpImmConstructor {{
_src1, _imm8, _dest, _srcSize, _destSize, _ext,
%(op_class)s)
{
- buildMe();
+ %(constructor)s;
}
}};
diff --git a/src/arch/x86/isa/microops/regop.isa b/src/arch/x86/isa/microops/regop.isa
index c072eca22..4b0080d40 100644
--- a/src/arch/x86/isa/microops/regop.isa
+++ b/src/arch/x86/isa/microops/regop.isa
@@ -101,20 +101,12 @@ def template MicroRegOpImmExecute {{
def template MicroRegOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- void buildMe();
-
public:
%(class_name)s(ExtMachInst _machInst,
const char * instMnem, uint64_t setFlags,
InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
uint8_t _dataSize, uint16_t _ext);
- %(class_name)s(ExtMachInst _machInst,
- const char * instMnem,
- InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
- uint8_t _dataSize, uint16_t _ext);
-
%(BasicExecDeclare)s
};
}};
@@ -123,42 +115,17 @@ def template MicroRegOpImmDeclare {{
class %(class_name)s : public %(base_class)s
{
- protected:
- void buildMe();
-
public:
%(class_name)s(ExtMachInst _machInst,
const char * instMnem, uint64_t setFlags,
InstRegIndex _src1, uint8_t _imm8, InstRegIndex _dest,
uint8_t _dataSize, uint16_t _ext);
- %(class_name)s(ExtMachInst _machInst,
- const char * instMnem,
- InstRegIndex _src1, uint8_t _imm8, InstRegIndex _dest,
- uint8_t _dataSize, uint16_t _ext);
-
%(BasicExecDeclare)s
};
}};
def template MicroRegOpConstructor {{
-
- inline void %(class_name)s::buildMe()
- {
- %(constructor)s;
- }
-
- inline %(class_name)s::%(class_name)s(
- ExtMachInst machInst, const char * instMnem,
- InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
- uint8_t _dataSize, uint16_t _ext) :
- %(base_class)s(machInst, "%(mnemonic)s", instMnem, 0,
- _src1, _src2, _dest, _dataSize, _ext,
- %(op_class)s)
- {
- buildMe();
- }
-
inline %(class_name)s::%(class_name)s(
ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
@@ -167,28 +134,11 @@ def template MicroRegOpConstructor {{
_src1, _src2, _dest, _dataSize, _ext,
%(op_class)s)
{
- buildMe();
+ %(constructor)s;
}
}};
def template MicroRegOpImmConstructor {{
-
- inline void %(class_name)s::buildMe()
- {
- %(constructor)s;
- }
-
- inline %(class_name)s::%(class_name)s(
- ExtMachInst machInst, const char * instMnem,
- InstRegIndex _src1, uint8_t _imm8, InstRegIndex _dest,
- uint8_t _dataSize, uint16_t _ext) :
- %(base_class)s(machInst, "%(mnemonic)s", instMnem, 0,
- _src1, _imm8, _dest, _dataSize, _ext,
- %(op_class)s)
- {
- buildMe();
- }
-
inline %(class_name)s::%(class_name)s(
ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
InstRegIndex _src1, uint8_t _imm8, InstRegIndex _dest,
@@ -197,7 +147,7 @@ def template MicroRegOpImmConstructor {{
_src1, _imm8, _dest, _dataSize, _ext,
%(op_class)s)
{
- buildMe();
+ %(constructor)s;
}
}};
diff --git a/src/arch/x86/isa/microops/seqop.isa b/src/arch/x86/isa/microops/seqop.isa
index 2a29a8771..57c44d48c 100644
--- a/src/arch/x86/isa/microops/seqop.isa
+++ b/src/arch/x86/isa/microops/seqop.isa
@@ -59,15 +59,10 @@ output header {{
def template SeqOpDeclare {{
class %(class_name)s : public %(base_class)s
{
- private:
- void buildMe();
public:
%(class_name)s(ExtMachInst _machInst, const char * instMnem,
uint64_t setFlags, uint16_t _target, uint8_t _cc);
- %(class_name)s(ExtMachInst _machInst, const char * instMnem,
- uint16_t _target, uint8_t _cc);
-
%(BasicExecDeclare)s
};
}};
@@ -91,14 +86,6 @@ def template SeqOpExecute {{
output decoder {{
inline SeqOpBase::SeqOpBase(
ExtMachInst machInst, const char * mnemonic, const char * instMnem,
- uint16_t _target, uint8_t _cc) :
- X86MicroopBase(machInst, mnemonic, instMnem, 0, No_OpClass),
- target(_target), cc(_cc)
- {
- }
-
- inline SeqOpBase::SeqOpBase(
- ExtMachInst machInst, const char * mnemonic, const char * instMnem,
uint64_t setFlags, uint16_t _target, uint8_t _cc) :
X86MicroopBase(machInst, mnemonic, instMnem, setFlags, No_OpClass),
target(_target), cc(_cc)
@@ -107,27 +94,13 @@ output decoder {{
}};
def template SeqOpConstructor {{
-
- inline void %(class_name)s::buildMe()
- {
- %(constructor)s;
- }
-
- inline %(class_name)s::%(class_name)s(
- ExtMachInst machInst, const char * instMnem,
- uint16_t _target, uint8_t _cc) :
- %(base_class)s(machInst, "%(mnemonic)s", instMnem, _target, _cc)
- {
- buildMe();
- }
-
inline %(class_name)s::%(class_name)s(
ExtMachInst machInst, const char * instMnem,
uint64_t setFlags, uint16_t _target, uint8_t _cc) :
%(base_class)s(machInst, "%(mnemonic)s", instMnem,
setFlags, _target, _cc)
{
- buildMe();
+ %(constructor)s;
}
}};
diff --git a/src/arch/x86/isa/microops/specop.isa b/src/arch/x86/isa/microops/specop.isa
index 5285496e7..f6978075b 100644
--- a/src/arch/x86/isa/microops/specop.isa
+++ b/src/arch/x86/isa/microops/specop.isa
@@ -52,9 +52,6 @@ output header {{
MicroFaultBase(ExtMachInst _machInst, const char * instMnem,
uint64_t setFlags, Fault _fault, uint8_t _cc);
- MicroFaultBase(ExtMachInst _machInst, const char * instMnem,
- Fault _fault, uint8_t _cc);
-
std::string generateDisassembly(Addr pc,
const SymbolTable *symtab) const;
};
@@ -68,11 +65,6 @@ output header {{
{
}
- MicroHalt(ExtMachInst _machInst, const char * instMnem) :
- X86MicroopBase(_machInst, "halt", instMnem, 0, No_OpClass)
- {
- }
-
%(BasicExecDeclare)s
std::string generateDisassembly(Addr pc,
@@ -83,15 +75,10 @@ output header {{
def template MicroFaultDeclare {{
class %(class_name)s : public %(base_class)s
{
- private:
- void buildMe();
public:
%(class_name)s(ExtMachInst _machInst, const char * instMnem,
uint64_t setFlags, Fault _fault, uint8_t _cc);
- %(class_name)s(ExtMachInst _machInst, const char * instMnem,
- Fault _fault, uint8_t _cc);
-
%(BasicExecDeclare)s
};
}};
@@ -124,14 +111,6 @@ output exec {{
output decoder {{
inline MicroFaultBase::MicroFaultBase(
ExtMachInst machInst, const char * instMnem,
- Fault _fault, uint8_t _cc) :
- X86MicroopBase(machInst, "fault", instMnem, 0, No_OpClass),
- fault(_fault), cc(_cc)
- {
- }
-
- inline MicroFaultBase::MicroFaultBase(
- ExtMachInst machInst, const char * instMnem,
uint64_t setFlags, Fault _fault, uint8_t _cc) :
X86MicroopBase(machInst, "fault", instMnem, setFlags, No_OpClass),
fault(_fault), cc(_cc)
@@ -140,26 +119,12 @@ output decoder {{
}};
def template MicroFaultConstructor {{
-
- inline void %(class_name)s::buildMe()
- {
- %(constructor)s;
- }
-
- inline %(class_name)s::%(class_name)s(
- ExtMachInst machInst, const char * instMnem,
- Fault _fault, uint8_t _cc) :
- %(base_class)s(machInst, instMnem, _fault, _cc)
- {
- buildMe();
- }
-
inline %(class_name)s::%(class_name)s(
ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
Fault _fault, uint8_t _cc) :
%(base_class)s(machInst, instMnem, setFlags, _fault, _cc)
{
- buildMe();
+ %(constructor)s;
}
}};