branch.isa (3787:023ac8d894a3) | branch.isa (3792:dae368e56d0e) |
---|---|
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 --- 234 unchanged lines hidden (view full) --- 243 decode_block = ROrImmDecode.subst(iop) 244 else: 245 decode_block = BasicDecode.subst(iop) 246}}; 247 248// Primary format for branch instructions: 249def format BranchN(bits, code, *opt_flags) {{ 250 code = re.sub(r'handle_annul', handle_annul, code) | 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 --- 234 unchanged lines hidden (view full) --- 243 decode_block = ROrImmDecode.subst(iop) 244 else: 245 decode_block = BasicDecode.subst(iop) 246}}; 247 248// Primary format for branch instructions: 249def format BranchN(bits, code, *opt_flags) {{ 250 code = re.sub(r'handle_annul', handle_annul, code) |
251 codeBlk = CodeBlock(code) | |
252 new_opt_flags = [] 253 for flag in opt_flags: 254 if flag == ',a': 255 name += ',a' 256 Name += 'Annul' 257 else: 258 new_opt_flags += flag | 251 new_opt_flags = [] 252 for flag in opt_flags: 253 if flag == ',a': 254 name += ',a' 255 Name += 'Annul' 256 else: 257 new_opt_flags += flag |
259 iop = InstObjParams(name, Name, "BranchNBits<%d>" % bits, codeBlk, new_opt_flags) | 258 iop = InstObjParams(name, Name, "BranchNBits<%d>" % bits, code, new_opt_flags) |
260 header_output = BasicDeclare.subst(iop) 261 decoder_output = BasicConstructor.subst(iop) 262 exec_output = BranchExecute.subst(iop) 263 decode_block = BasicDecode.subst(iop) 264}}; 265 266// Primary format for branch instructions: 267def format BranchSplit(code, *opt_flags) {{ 268 code = re.sub(r'handle_annul', handle_annul, code) | 259 header_output = BasicDeclare.subst(iop) 260 decoder_output = BasicConstructor.subst(iop) 261 exec_output = BranchExecute.subst(iop) 262 decode_block = BasicDecode.subst(iop) 263}}; 264 265// Primary format for branch instructions: 266def format BranchSplit(code, *opt_flags) {{ 267 code = re.sub(r'handle_annul', handle_annul, code) |
269 codeBlk = CodeBlock(code) 270 iop = InstObjParams(name, Name, 'BranchSplit', codeBlk, opt_flags) | 268 iop = InstObjParams(name, Name, 'BranchSplit', code, opt_flags) |
271 header_output = BasicDeclare.subst(iop) 272 decoder_output = BasicConstructor.subst(iop) 273 exec_output = BranchExecute.subst(iop) 274 decode_block = BasicDecode.subst(iop) 275}}; 276 | 269 header_output = BasicDeclare.subst(iop) 270 decoder_output = BasicConstructor.subst(iop) 271 exec_output = BranchExecute.subst(iop) 272 decode_block = BasicDecode.subst(iop) 273}}; 274 |