Deleted Added
sdiff udiff text old ( 7480:6a854784be4f ) new ( 7620:3d8a23caa1ef )
full compact
1// Copyright (c) 2007-2008 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

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

101def template MicroRegOpDeclare {{
102 class %(class_name)s : public %(base_class)s
103 {
104 protected:
105 void buildMe();
106
107 public:
108 %(class_name)s(ExtMachInst _machInst,
109 const char * instMnem,
110 bool isMicro, bool isDelayed, bool isFirst, bool isLast,
111 InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
112 uint8_t _dataSize, uint16_t _ext);
113
114 %(class_name)s(ExtMachInst _machInst,
115 const char * instMnem,
116 InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
117 uint8_t _dataSize, uint16_t _ext);
118

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

124
125 class %(class_name)s : public %(base_class)s
126 {
127 protected:
128 void buildMe();
129
130 public:
131 %(class_name)s(ExtMachInst _machInst,
132 const char * instMnem,
133 bool isMicro, bool isDelayed, bool isFirst, bool isLast,
134 InstRegIndex _src1, uint8_t _imm8, InstRegIndex _dest,
135 uint8_t _dataSize, uint16_t _ext);
136
137 %(class_name)s(ExtMachInst _machInst,
138 const char * instMnem,
139 InstRegIndex _src1, uint8_t _imm8, InstRegIndex _dest,
140 uint8_t _dataSize, uint16_t _ext);
141

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

149 {
150 %(constructor)s;
151 }
152
153 inline %(class_name)s::%(class_name)s(
154 ExtMachInst machInst, const char * instMnem,
155 InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
156 uint8_t _dataSize, uint16_t _ext) :
157 %(base_class)s(machInst, "%(mnemonic)s", instMnem,
158 false, false, false, false,
159 _src1, _src2, _dest, _dataSize, _ext,
160 %(op_class)s)
161 {
162 buildMe();
163 }
164
165 inline %(class_name)s::%(class_name)s(
166 ExtMachInst machInst, const char * instMnem,
167 bool isMicro, bool isDelayed, bool isFirst, bool isLast,
168 InstRegIndex _src1, InstRegIndex _src2, InstRegIndex _dest,
169 uint8_t _dataSize, uint16_t _ext) :
170 %(base_class)s(machInst, "%(mnemonic)s", instMnem,
171 isMicro, isDelayed, isFirst, isLast,
172 _src1, _src2, _dest, _dataSize, _ext,
173 %(op_class)s)
174 {
175 buildMe();
176 }
177}};
178
179def template MicroRegOpImmConstructor {{
180
181 inline void %(class_name)s::buildMe()
182 {
183 %(constructor)s;
184 }
185
186 inline %(class_name)s::%(class_name)s(
187 ExtMachInst machInst, const char * instMnem,
188 InstRegIndex _src1, uint8_t _imm8, InstRegIndex _dest,
189 uint8_t _dataSize, uint16_t _ext) :
190 %(base_class)s(machInst, "%(mnemonic)s", instMnem,
191 false, false, false, false,
192 _src1, _imm8, _dest, _dataSize, _ext,
193 %(op_class)s)
194 {
195 buildMe();
196 }
197
198 inline %(class_name)s::%(class_name)s(
199 ExtMachInst machInst, const char * instMnem,
200 bool isMicro, bool isDelayed, bool isFirst, bool isLast,
201 InstRegIndex _src1, uint8_t _imm8, InstRegIndex _dest,
202 uint8_t _dataSize, uint16_t _ext) :
203 %(base_class)s(machInst, "%(mnemonic)s", instMnem,
204 isMicro, isDelayed, isFirst, isLast,
205 _src1, _imm8, _dest, _dataSize, _ext,
206 %(op_class)s)
207 {
208 buildMe();
209 }
210}};
211
212output header {{

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

416 if flags is None:
417 self.ext = 0
418 else:
419 if not isinstance(flags, (list, tuple)):
420 raise Exception, "flags must be a list or tuple of flags"
421 self.ext = " | ".join(flags)
422 self.className += "Flags"
423
424 def getAllocator(self, *microFlags):
425 className = self.className
426 if self.mnemonic == self.base_mnemonic + 'i':
427 className += "Imm"
428 allocator = '''new %(class_name)s(machInst, macrocodeBlock
429 %(flags)s, %(src1)s, %(op2)s, %(dest)s,
430 %(dataSize)s, %(ext)s)''' % {
431 "class_name" : className,
432 "flags" : self.microFlagsText(microFlags),
433 "src1" : self.src1, "op2" : self.op2,
434 "dest" : self.dest,
435 "dataSize" : self.dataSize,
436 "ext" : self.ext}

--- 1004 unchanged lines hidden ---