limmop.isa (4539:6eeeea62b7c4) | limmop.isa (4576:31f715613103) |
---|---|
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 --- 109 unchanged lines hidden (view full) --- 118 isMicro, isDelayed, isFirst, isLast, %(op_class)s), 119 dest(_dest), imm(_imm) 120 { 121 buildMe(); 122 } 123}}; 124 125let {{ | 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 --- 109 unchanged lines hidden (view full) --- 118 isMicro, isDelayed, isFirst, isLast, %(op_class)s), 119 dest(_dest), imm(_imm) 120 { 121 buildMe(); 122 } 123}}; 124 125let {{ |
126 class LimmOp(object): | 126 class LimmOp(X86Microop): |
127 def __init__(self, dest, imm): | 127 def __init__(self, dest, imm): |
128 self.className = "Limm" 129 self.mnemonic = "limm" |
|
128 self.dest = dest 129 self.imm = imm 130 131 def getAllocator(self, *microFlags): | 130 self.dest = dest 131 self.imm = imm 132 133 def getAllocator(self, *microFlags): |
132 allocator = '''new %(class_name)s(machInst, %(mnemonic)s, 133 %(flags)s %(dest)s, %(imm)s,)''' % { | 134 allocator = '''new %(class_name)s(machInst, mnemonic 135 %(flags)s, %(dest)s, %(imm)s)''' % { |
134 "class_name" : self.className, 135 "mnemonic" : self.mnemonic, 136 "flags" : self.microFlagsText(microFlags), 137 "dest" : self.dest, "imm" : self.imm } | 136 "class_name" : self.className, 137 "mnemonic" : self.mnemonic, 138 "flags" : self.microFlagsText(microFlags), 139 "dest" : self.dest, "imm" : self.imm } |
140 return allocator |
|
138 139 microopClasses["limm"] = LimmOp 140}}; 141 142let {{ 143 # Build up the all register version of this micro op 144 iop = InstObjParams("limm", "Limm", 'X86MicroopBase', 145 {"code" : "DestReg = imm;"}) 146 header_output += MicroLimmOpDeclare.subst(iop) 147 decoder_output += MicroLimmOpConstructor.subst(iop) 148 exec_output += MicroLimmOpExecute.subst(iop) 149}}; | 141 142 microopClasses["limm"] = LimmOp 143}}; 144 145let {{ 146 # Build up the all register version of this micro op 147 iop = InstObjParams("limm", "Limm", 'X86MicroopBase', 148 {"code" : "DestReg = imm;"}) 149 header_output += MicroLimmOpDeclare.subst(iop) 150 decoder_output += MicroLimmOpConstructor.subst(iop) 151 exec_output += MicroLimmOpExecute.subst(iop) 152}}; |