return ss.str();
}
+std::string
+RegImmOp::generateDisassembly(Addr pc, const SymbolTable *symtab) const
+{
+ std::stringstream ss;
+ printMnemonic(ss);
+ printReg(ss, dest);
+ ccprintf(ss, ", #%d", imm);
+ return ss.str();
+}
+
std::string
RegRegOp::generateDisassembly(Addr pc, const SymbolTable *symtab) const
{
std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
};
+class RegImmOp : public PredOp
+{
+ protected:
+ IntRegIndex dest;
+ uint64_t imm;
+
+ RegImmOp(const char *mnem, ExtMachInst _machInst, OpClass __opClass,
+ IntRegIndex _dest, uint64_t _imm) :
+ PredOp(mnem, _machInst, __opClass), dest(_dest), imm(_imm)
+ {}
+
+ std::string generateDisassembly(Addr pc, const SymbolTable *symtab) const;
+};
+
class RegRegOp : public PredOp
{
protected:
}
}};
+def template RegImmOpDeclare {{
+class %(class_name)s : public %(base_class)s
+{
+ protected:
+ public:
+ // Constructor
+ %(class_name)s(ExtMachInst machInst, IntRegIndex _dest, uint64_t _imm);
+ %(BasicExecDeclare)s
+};
+}};
+
+def template RegImmOpConstructor {{
+ inline %(class_name)s::%(class_name)s(ExtMachInst machInst,
+ IntRegIndex _dest, uint64_t _imm)
+ : %(base_class)s("%(mnemonic)s", machInst, %(op_class)s, _dest, _imm)
+ {
+ %(constructor)s;
+ }
+}};
+
def template RegRegOpDeclare {{
class %(class_name)s : public %(base_class)s
{