limmop.isa (6345:f9ae7c3a036c) | limmop.isa (6524:e207990ddd14) |
---|---|
1// Copyright (c) 2007 The Hewlett-Packard Development Company 2// All rights reserved. 3// 4// Redistribution and use of this software in source and binary forms, 5// with or without modification, are permitted provided that the 6// following conditions are met: 7// 8// The software must be used only for Non-Commercial Use which means any --- 150 unchanged lines hidden (view full) --- 159 "class_name" : self.className, 160 "mnemonic" : self.mnemonic, 161 "flags" : self.microFlagsText(microFlags), 162 "dest" : self.dest, "imm" : self.imm, 163 "dataSize" : self.dataSize} 164 return allocator 165 166 microopClasses["limm"] = LimmOp | 1// Copyright (c) 2007 The Hewlett-Packard Development Company 2// All rights reserved. 3// 4// Redistribution and use of this software in source and binary forms, 5// with or without modification, are permitted provided that the 6// following conditions are met: 7// 8// The software must be used only for Non-Commercial Use which means any --- 150 unchanged lines hidden (view full) --- 159 "class_name" : self.className, 160 "mnemonic" : self.mnemonic, 161 "flags" : self.microFlagsText(microFlags), 162 "dest" : self.dest, "imm" : self.imm, 163 "dataSize" : self.dataSize} 164 return allocator 165 166 microopClasses["limm"] = LimmOp |
167 168 class LfpimmOp(X86Microop): 169 def __init__(self, dest, imm, dataSize="env.dataSize"): 170 self.className = "Lfpimm" 171 self.mnemonic = "lfpimm" 172 self.dest = dest 173 if isinstance(imm, (int, long)): 174 imm = "ULL(%d)" % imm 175 if isinstance(imm, float): 176 imm = "reinterpret_cast<uint64_t>((double)(%d))" 177 self.imm = imm 178 self.dataSize = dataSize 179 180 def getAllocator(self, *microFlags): 181 allocator = '''new %(class_name)s(machInst, macrocodeBlock 182 %(flags)s, %(dest)s, %(imm)s, %(dataSize)s)''' % { 183 "class_name" : self.className, 184 "mnemonic" : self.mnemonic, 185 "flags" : self.microFlagsText(microFlags), 186 "dest" : self.dest, "imm" : self.imm, 187 "dataSize" : self.dataSize} 188 return allocator 189 190 microopClasses["lfpimm"] = LfpimmOp |
|
167}}; 168 169let {{ 170 # Build up the all register version of this micro op 171 iop = InstObjParams("limm", "Limm", 'X86MicroopBase', 172 {"code" : "DestReg = merge(DestReg, imm, dataSize);"}) 173 header_output += MicroLimmOpDeclare.subst(iop) 174 decoder_output += MicroLimmOpConstructor.subst(iop) 175 decoder_output += MicroLimmOpDisassembly.subst(iop) 176 exec_output += MicroLimmOpExecute.subst(iop) | 191}}; 192 193let {{ 194 # Build up the all register version of this micro op 195 iop = InstObjParams("limm", "Limm", 'X86MicroopBase', 196 {"code" : "DestReg = merge(DestReg, imm, dataSize);"}) 197 header_output += MicroLimmOpDeclare.subst(iop) 198 decoder_output += MicroLimmOpConstructor.subst(iop) 199 decoder_output += MicroLimmOpDisassembly.subst(iop) 200 exec_output += MicroLimmOpExecute.subst(iop) |
201 202 iop = InstObjParams("lfpimm", "Lfpimm", 'X86MicroopBase', 203 {"code" : "FpDestReg.uqw = imm"}) 204 header_output += MicroLimmOpDeclare.subst(iop) 205 decoder_output += MicroLimmOpConstructor.subst(iop) 206 decoder_output += MicroLimmOpDisassembly.subst(iop) 207 exec_output += MicroLimmOpExecute.subst(iop) |
|
177}}; | 208}}; |