branch.isa (2944:10dcffb2904f) branch.isa (3056:f613791cfec0)
1// Copyright (c) 2006 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright

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

219 NPC = xc->readNextPC();
220 NNPC = xc->readNextNPC();
221 }
222 }'''
223}};
224
225// Primary format for branch instructions:
226def format Branch(code, *opt_flags) {{
1// Copyright (c) 2006 The Regents of The University of Michigan
2// All rights reserved.
3//
4// Redistribution and use in source and binary forms, with or without
5// modification, are permitted provided that the following conditions are
6// met: redistributions of source code must retain the above copyright
7// notice, this list of conditions and the following disclaimer;
8// redistributions in binary form must reproduce the above copyright

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

219 NPC = xc->readNextPC();
220 NNPC = xc->readNextNPC();
221 }
222 }'''
223}};
224
225// Primary format for branch instructions:
226def format Branch(code, *opt_flags) {{
227 code = re.sub(r'handle_annul', handle_annul, code)
228 (usesImm, code, immCode,
229 rString, iString) = splitOutImm(code)
230 iop = InstObjParams(name, Name, 'Branch', code, opt_flags)
231 header_output = BasicDeclare.subst(iop)
232 decoder_output = BasicConstructor.subst(iop)
233 exec_output = BranchExecute.subst(iop)
234 if usesImm:
235 imm_iop = InstObjParams(name, Name + 'Imm', 'BranchImm' + iString,

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

241 else:
242 decode_block = BasicDecode.subst(iop)
243}};
244
245// Primary format for branch instructions:
246def format BranchN(bits, code, *opt_flags) {{
247 code = re.sub(r'handle_annul', handle_annul, code)
248 codeBlk = CodeBlock(code)
227 (usesImm, code, immCode,
228 rString, iString) = splitOutImm(code)
229 iop = InstObjParams(name, Name, 'Branch', code, opt_flags)
230 header_output = BasicDeclare.subst(iop)
231 decoder_output = BasicConstructor.subst(iop)
232 exec_output = BranchExecute.subst(iop)
233 if usesImm:
234 imm_iop = InstObjParams(name, Name + 'Imm', 'BranchImm' + iString,

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

240 else:
241 decode_block = BasicDecode.subst(iop)
242}};
243
244// Primary format for branch instructions:
245def format BranchN(bits, code, *opt_flags) {{
246 code = re.sub(r'handle_annul', handle_annul, code)
247 codeBlk = CodeBlock(code)
249 iop = InstObjParams(name, Name, "BranchNBits<%d>" % bits, codeBlk, opt_flags)
248 new_opt_flags = []
249 for flag in opt_flags:
250 if flag == ',a':
251 name += ',a'
252 Name += 'Annul'
253 else:
254 new_opt_flags += flag
255 iop = InstObjParams(name, Name, "BranchNBits<%d>" % bits, codeBlk, new_opt_flags)
250 header_output = BasicDeclare.subst(iop)
251 decoder_output = BasicConstructor.subst(iop)
252 exec_output = BranchExecute.subst(iop)
253 decode_block = BasicDecode.subst(iop)
254}};
255
256// Primary format for branch instructions:
257def format BranchSplit(code, *opt_flags) {{
258 code = re.sub(r'handle_annul', handle_annul, code)
259 codeBlk = CodeBlock(code)
260 iop = InstObjParams(name, Name, 'BranchSplit', codeBlk, opt_flags)
261 header_output = BasicDeclare.subst(iop)
262 decoder_output = BasicConstructor.subst(iop)
263 exec_output = BranchExecute.subst(iop)
264 decode_block = BasicDecode.subst(iop)
265}};
266
256 header_output = BasicDeclare.subst(iop)
257 decoder_output = BasicConstructor.subst(iop)
258 exec_output = BranchExecute.subst(iop)
259 decode_block = BasicDecode.subst(iop)
260}};
261
262// Primary format for branch instructions:
263def format BranchSplit(code, *opt_flags) {{
264 code = re.sub(r'handle_annul', handle_annul, code)
265 codeBlk = CodeBlock(code)
266 iop = InstObjParams(name, Name, 'BranchSplit', codeBlk, opt_flags)
267 header_output = BasicDeclare.subst(iop)
268 decoder_output = BasicConstructor.subst(iop)
269 exec_output = BranchExecute.subst(iop)
270 decode_block = BasicDecode.subst(iop)
271}};
272