limmop.isa (7620:3d8a23caa1ef) limmop.isa (7626:bdd926760470)
1// Copyright (c) 2007 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// The license below extends only to copyright in the software and shall
5// not be construed as granting a license to any other intellectual
6// property including but not limited to intellectual property relating
7// to a hardware implementation of the functionality of the software
8// licensed hereunder. You may use the software subject to the license

--- 47 unchanged lines hidden (view full) ---

56def template MicroLimmOpDeclare {{
57 class %(class_name)s : public X86ISA::X86MicroopBase
58 {
59 protected:
60 const RegIndex dest;
61 const uint64_t imm;
62 const uint8_t dataSize;
63 RegIndex foldOBit;
1// Copyright (c) 2007 The Hewlett-Packard Development Company
2// All rights reserved.
3//
4// The license below extends only to copyright in the software and shall
5// not be construed as granting a license to any other intellectual
6// property including but not limited to intellectual property relating
7// to a hardware implementation of the functionality of the software
8// licensed hereunder. You may use the software subject to the license

--- 47 unchanged lines hidden (view full) ---

56def template MicroLimmOpDeclare {{
57 class %(class_name)s : public X86ISA::X86MicroopBase
58 {
59 protected:
60 const RegIndex dest;
61 const uint64_t imm;
62 const uint8_t dataSize;
63 RegIndex foldOBit;
64 void buildMe();
65
66 std::string generateDisassembly(Addr pc,
67 const SymbolTable *symtab) const;
68
69 public:
70 %(class_name)s(ExtMachInst _machInst,
71 const char * instMnem,
72 uint64_t setFlags, InstRegIndex _dest,
73 uint64_t _imm, uint8_t _dataSize);
74
64
65 std::string generateDisassembly(Addr pc,
66 const SymbolTable *symtab) const;
67
68 public:
69 %(class_name)s(ExtMachInst _machInst,
70 const char * instMnem,
71 uint64_t setFlags, InstRegIndex _dest,
72 uint64_t _imm, uint8_t _dataSize);
73
75 %(class_name)s(ExtMachInst _machInst,
76 const char * instMnem,
77 InstRegIndex _dest, uint64_t _imm, uint8_t _dataSize);
78
79 %(BasicExecDeclare)s
80 };
81}};
82
83def template MicroLimmOpDisassembly {{
84 std::string %(class_name)s::generateDisassembly(Addr pc,
85 const SymbolTable *symtab) const
86 {
87 std::stringstream response;
88
89 printMnemonic(response, instMnem, mnemonic);
90 printDestReg(response, 0, dataSize);
91 response << ", ";
92 ccprintf(response, "%#x", imm);
93 return response.str();
94 }
95}};
96
97def template MicroLimmOpConstructor {{
74 %(BasicExecDeclare)s
75 };
76}};
77
78def template MicroLimmOpDisassembly {{
79 std::string %(class_name)s::generateDisassembly(Addr pc,
80 const SymbolTable *symtab) const
81 {
82 std::stringstream response;
83
84 printMnemonic(response, instMnem, mnemonic);
85 printDestReg(response, 0, dataSize);
86 response << ", ";
87 ccprintf(response, "%#x", imm);
88 return response.str();
89 }
90}};
91
92def template MicroLimmOpConstructor {{
98
99 inline void %(class_name)s::buildMe()
100 {
101 foldOBit = (dataSize == 1 && !machInst.rex.present) ? 1 << 6 : 0;
102 %(constructor)s;
103 }
104
105 inline %(class_name)s::%(class_name)s(
93 inline %(class_name)s::%(class_name)s(
106 ExtMachInst machInst, const char * instMnem,
107 InstRegIndex _dest, uint64_t _imm, uint8_t _dataSize) :
108 %(base_class)s(machInst, "%(mnemonic)s", instMnem, 0, %(op_class)s),
109 dest(_dest.idx), imm(_imm), dataSize(_dataSize)
110 {
111 buildMe();
112 }
113
114 inline %(class_name)s::%(class_name)s(
115 ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
116 InstRegIndex _dest, uint64_t _imm, uint8_t _dataSize) :
117 %(base_class)s(machInst, "%(mnemonic)s", instMnem,
118 setFlags, %(op_class)s),
119 dest(_dest.idx), imm(_imm), dataSize(_dataSize)
120 {
94 ExtMachInst machInst, const char * instMnem, uint64_t setFlags,
95 InstRegIndex _dest, uint64_t _imm, uint8_t _dataSize) :
96 %(base_class)s(machInst, "%(mnemonic)s", instMnem,
97 setFlags, %(op_class)s),
98 dest(_dest.idx), imm(_imm), dataSize(_dataSize)
99 {
121 buildMe();
100 foldOBit = (dataSize == 1 && !machInst.rex.present) ? 1 << 6 : 0;
101 %(constructor)s;
122 }
123}};
124
125let {{
126 class LimmOp(X86Microop):
127 def __init__(self, dest, imm, dataSize="env.dataSize"):
128 self.className = "Limm"
129 self.mnemonic = "limm"

--- 59 unchanged lines hidden ---
102 }
103}};
104
105let {{
106 class LimmOp(X86Microop):
107 def __init__(self, dest, imm, dataSize="env.dataSize"):
108 self.className = "Limm"
109 self.mnemonic = "limm"

--- 59 unchanged lines hidden ---