limmop.isa (7087:fb8d5786ff30) | limmop.isa (7620:3d8a23caa1ef) |
---|---|
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 --- 55 unchanged lines hidden (view full) --- 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, | 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 --- 55 unchanged lines hidden (view full) --- 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 bool isMicro, bool isDelayed, bool isFirst, bool isLast, 73 InstRegIndex _dest, uint64_t _imm, uint8_t _dataSize); | 72 uint64_t setFlags, InstRegIndex _dest, 73 uint64_t _imm, uint8_t _dataSize); |
74 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}}; --- 18 unchanged lines hidden (view full) --- 100 { 101 foldOBit = (dataSize == 1 && !machInst.rex.present) ? 1 << 6 : 0; 102 %(constructor)s; 103 } 104 105 inline %(class_name)s::%(class_name)s( 106 ExtMachInst machInst, const char * instMnem, 107 InstRegIndex _dest, uint64_t _imm, uint8_t _dataSize) : | 74 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}}; --- 18 unchanged lines hidden (view full) --- 100 { 101 foldOBit = (dataSize == 1 && !machInst.rex.present) ? 1 << 6 : 0; 102 %(constructor)s; 103 } 104 105 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, 109 false, false, false, false, %(op_class)s), | 108 %(base_class)s(machInst, "%(mnemonic)s", instMnem, 0, %(op_class)s), |
110 dest(_dest.idx), imm(_imm), dataSize(_dataSize) 111 { 112 buildMe(); 113 } 114 115 inline %(class_name)s::%(class_name)s( | 109 dest(_dest.idx), imm(_imm), dataSize(_dataSize) 110 { 111 buildMe(); 112 } 113 114 inline %(class_name)s::%(class_name)s( |
116 ExtMachInst machInst, const char * instMnem, 117 bool isMicro, bool isDelayed, bool isFirst, bool isLast, | 115 ExtMachInst machInst, const char * instMnem, uint64_t setFlags, |
118 InstRegIndex _dest, uint64_t _imm, uint8_t _dataSize) : 119 %(base_class)s(machInst, "%(mnemonic)s", instMnem, | 116 InstRegIndex _dest, uint64_t _imm, uint8_t _dataSize) : 117 %(base_class)s(machInst, "%(mnemonic)s", instMnem, |
120 isMicro, isDelayed, isFirst, isLast, %(op_class)s), | 118 setFlags, %(op_class)s), |
121 dest(_dest.idx), imm(_imm), dataSize(_dataSize) 122 { 123 buildMe(); 124 } 125}}; 126 127let {{ 128 class LimmOp(X86Microop): 129 def __init__(self, dest, imm, dataSize="env.dataSize"): 130 self.className = "Limm" 131 self.mnemonic = "limm" 132 self.dest = dest 133 if isinstance(imm, (int, long)): 134 imm = "ULL(%d)" % imm 135 self.imm = imm 136 self.dataSize = dataSize 137 | 119 dest(_dest.idx), imm(_imm), dataSize(_dataSize) 120 { 121 buildMe(); 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" 130 self.dest = dest 131 if isinstance(imm, (int, long)): 132 imm = "ULL(%d)" % imm 133 self.imm = imm 134 self.dataSize = dataSize 135 |
138 def getAllocator(self, *microFlags): 139 allocator = '''new %(class_name)s(machInst, macrocodeBlock | 136 def getAllocator(self, microFlags): 137 allocator = '''new %(class_name)s(machInst, macrocodeBlock, |
140 %(flags)s, %(dest)s, %(imm)s, %(dataSize)s)''' % { 141 "class_name" : self.className, 142 "mnemonic" : self.mnemonic, 143 "flags" : self.microFlagsText(microFlags), 144 "dest" : self.dest, "imm" : self.imm, 145 "dataSize" : self.dataSize} 146 return allocator 147 --- 6 unchanged lines hidden (view full) --- 154 self.dest = dest 155 if isinstance(imm, (int, long)): 156 imm = "ULL(%d)" % imm 157 if isinstance(imm, float): 158 imm = "reinterpret_cast<uint64_t>((double)(%d))" 159 self.imm = imm 160 self.dataSize = dataSize 161 | 138 %(flags)s, %(dest)s, %(imm)s, %(dataSize)s)''' % { 139 "class_name" : self.className, 140 "mnemonic" : self.mnemonic, 141 "flags" : self.microFlagsText(microFlags), 142 "dest" : self.dest, "imm" : self.imm, 143 "dataSize" : self.dataSize} 144 return allocator 145 --- 6 unchanged lines hidden (view full) --- 152 self.dest = dest 153 if isinstance(imm, (int, long)): 154 imm = "ULL(%d)" % imm 155 if isinstance(imm, float): 156 imm = "reinterpret_cast<uint64_t>((double)(%d))" 157 self.imm = imm 158 self.dataSize = dataSize 159 |
162 def getAllocator(self, *microFlags): 163 allocator = '''new %(class_name)s(machInst, macrocodeBlock | 160 def getAllocator(self, microFlags): 161 allocator = '''new %(class_name)s(machInst, macrocodeBlock, |
164 %(flags)s, %(dest)s, %(imm)s, %(dataSize)s)''' % { 165 "class_name" : self.className, 166 "mnemonic" : self.mnemonic, 167 "flags" : self.microFlagsText(microFlags), 168 "dest" : self.dest, "imm" : self.imm, 169 "dataSize" : self.dataSize} 170 return allocator 171 --- 19 unchanged lines hidden --- | 162 %(flags)s, %(dest)s, %(imm)s, %(dataSize)s)''' % { 163 "class_name" : self.className, 164 "mnemonic" : self.mnemonic, 165 "flags" : self.microFlagsText(microFlags), 166 "dest" : self.dest, "imm" : self.imm, 167 "dataSize" : self.dataSize} 168 return allocator 169 --- 19 unchanged lines hidden --- |