macroop.isa (4371:c5003760793e) macroop.isa (4519:f8da6b45573f)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 The Hewlett-Packard Development Company
4// All rights reserved.
5//
6// Redistribution and use of this software in source and binary forms,
7// with or without modification, are permitted provided that the
8// following conditions are met:

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

144let {{
145 def genMacroOp(name, Name, opSeq):
146 numMicroOps = len(opSeq)
147 allocMicroOps = ''
148 micropc = 0
149 for op in opSeq:
150 allocMicroOps += \
151 "microOps[%d] = %s;\n" % \
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 The Hewlett-Packard Development Company
4// All rights reserved.
5//
6// Redistribution and use of this software in source and binary forms,
7// with or without modification, are permitted provided that the
8// following conditions are met:

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

144let {{
145 def genMacroOp(name, Name, opSeq):
146 numMicroOps = len(opSeq)
147 allocMicroOps = ''
148 micropc = 0
149 for op in opSeq:
150 allocMicroOps += \
151 "microOps[%d] = %s;\n" % \
152 (micropc, op.getAllocator('"' + name + '"', True, False, #op.delayed,
152 (micropc, op.getAllocator('"' + name + '"', True, False,
153 #op.delayed,
153 micropc == 0,
154 micropc == numMicroOps - 1))
155 micropc += 1
156 iop = InstObjParams(name, Name, 'MacroOp',
157 {'code' : '', 'num_micro_ops' : numMicroOps,
158 'alloc_micro_ops' : allocMicroOps})
159 header_output = MacroDeclare.subst(iop)
160 decoder_output = MacroConstructor.subst(iop)
161 decode_block = BasicDecode.subst(iop)
162 exec_output = ''
163 return (header_output, decoder_output, decode_block, exec_output)
164}};
154 micropc == 0,
155 micropc == numMicroOps - 1))
156 micropc += 1
157 iop = InstObjParams(name, Name, 'MacroOp',
158 {'code' : '', 'num_micro_ops' : numMicroOps,
159 'alloc_micro_ops' : allocMicroOps})
160 header_output = MacroDeclare.subst(iop)
161 decoder_output = MacroConstructor.subst(iop)
162 decode_block = BasicDecode.subst(iop)
163 exec_output = ''
164 return (header_output, decoder_output, decode_block, exec_output)
165}};