X86: Get rid of the flagless microop constructor.
This will reduce clutter in the source and hopefully speed up compilation.
This commit is contained in:
@@ -85,7 +85,8 @@ def format StringInst(*opTypeSet) {{
|
||||
%s
|
||||
} else if (LEGACY_REPNE) {
|
||||
// The repne prefix is illegal
|
||||
return new MicroFault(machInst, "illprefix", new InvalidOpcode, 0);
|
||||
return new MicroFault(machInst, "illprefix", 0,
|
||||
new InvalidOpcode, 0);
|
||||
} else {
|
||||
%s
|
||||
}
|
||||
|
||||
@@ -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
|
||||
};
|
||||
}};
|
||||
@@ -91,14 +83,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) :
|
||||
@@ -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;
|
||||
}
|
||||
}};
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}};
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}};
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}};
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}};
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}};
|
||||
|
||||
|
||||
@@ -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
|
||||
};
|
||||
}};
|
||||
@@ -89,14 +84,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) :
|
||||
@@ -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;
|
||||
}
|
||||
}};
|
||||
|
||||
|
||||
@@ -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
|
||||
};
|
||||
}};
|
||||
@@ -122,14 +109,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) :
|
||||
@@ -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;
|
||||
}
|
||||
}};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user