limmop.isa (7626:bdd926760470) | limmop.isa (7967:b243dc8cec8b) |
---|---|
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 --- 100 unchanged lines hidden (view full) --- 109 self.mnemonic = "limm" 110 self.dest = dest 111 if isinstance(imm, (int, long)): 112 imm = "ULL(%d)" % imm 113 self.imm = imm 114 self.dataSize = dataSize 115 116 def getAllocator(self, microFlags): | 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 --- 100 unchanged lines hidden (view full) --- 109 self.mnemonic = "limm" 110 self.dest = dest 111 if isinstance(imm, (int, long)): 112 imm = "ULL(%d)" % imm 113 self.imm = imm 114 self.dataSize = dataSize 115 116 def getAllocator(self, microFlags): |
117 allocator = '''new %(class_name)s(machInst, macrocodeBlock, 118 %(flags)s, %(dest)s, %(imm)s, %(dataSize)s)''' % { | 117 allocString = ''' 118 (%(dataSize)s >= 4) ? 119 (StaticInstPtr)(new %(class_name)sBig(machInst, 120 macrocodeBlock, %(flags)s, %(dest)s, %(imm)s, 121 %(dataSize)s)) : 122 (StaticInstPtr)(new %(class_name)s(machInst, 123 macrocodeBlock, %(flags)s, %(dest)s, %(imm)s, 124 %(dataSize)s)) 125 ''' 126 allocator = allocString % { |
119 "class_name" : self.className, 120 "mnemonic" : self.mnemonic, 121 "flags" : self.microFlagsText(microFlags), 122 "dest" : self.dest, "imm" : self.imm, 123 "dataSize" : self.dataSize} 124 return allocator 125 126 microopClasses["limm"] = LimmOp --- 20 unchanged lines hidden (view full) --- 147 "dataSize" : self.dataSize} 148 return allocator 149 150 microopClasses["lfpimm"] = LfpimmOp 151}}; 152 153let {{ 154 # Build up the all register version of this micro op | 127 "class_name" : self.className, 128 "mnemonic" : self.mnemonic, 129 "flags" : self.microFlagsText(microFlags), 130 "dest" : self.dest, "imm" : self.imm, 131 "dataSize" : self.dataSize} 132 return allocator 133 134 microopClasses["limm"] = LimmOp --- 20 unchanged lines hidden (view full) --- 155 "dataSize" : self.dataSize} 156 return allocator 157 158 microopClasses["lfpimm"] = LfpimmOp 159}}; 160 161let {{ 162 # Build up the all register version of this micro op |
155 iop = InstObjParams("limm", "Limm", 'X86MicroopBase', 156 {"code" : "DestReg = merge(DestReg, imm, dataSize);"}) 157 header_output += MicroLimmOpDeclare.subst(iop) 158 decoder_output += MicroLimmOpConstructor.subst(iop) 159 decoder_output += MicroLimmOpDisassembly.subst(iop) 160 exec_output += MicroLimmOpExecute.subst(iop) | 163 iops = [InstObjParams("limm", "Limm", 'X86MicroopBase', 164 {"code" : "DestReg = merge(DestReg, imm, dataSize);"}), 165 InstObjParams("limm", "LimmBig", 'X86MicroopBase', 166 {"code" : "DestReg = imm & mask(dataSize * 8);"})] 167 for iop in iops: 168 header_output += MicroLimmOpDeclare.subst(iop) 169 decoder_output += MicroLimmOpConstructor.subst(iop) 170 decoder_output += MicroLimmOpDisassembly.subst(iop) 171 exec_output += MicroLimmOpExecute.subst(iop) |
161 162 iop = InstObjParams("lfpimm", "Lfpimm", 'X86MicroopBase', 163 {"code" : "FpDestReg.uqw = imm"}) 164 header_output += MicroLimmOpDeclare.subst(iop) 165 decoder_output += MicroLimmOpConstructor.subst(iop) 166 decoder_output += MicroLimmOpDisassembly.subst(iop) 167 exec_output += MicroLimmOpExecute.subst(iop) 168}}; | 172 173 iop = InstObjParams("lfpimm", "Lfpimm", 'X86MicroopBase', 174 {"code" : "FpDestReg.uqw = imm"}) 175 header_output += MicroLimmOpDeclare.subst(iop) 176 decoder_output += MicroLimmOpConstructor.subst(iop) 177 decoder_output += MicroLimmOpDisassembly.subst(iop) 178 exec_output += MicroLimmOpExecute.subst(iop) 179}}; |