1// Copyright (c) 2008 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 --- 181 unchanged lines hidden (view full) --- 190 return allocator 191 192 class Br(SeqOp): 193 className = "MicroBranch" 194 195 def getAllocator(self, *microFlags): 196 (is_micro, is_delayed, is_first, is_last) = microFlags 197 is_last = False |
198 is_delayed = True |
199 microFlags = (is_micro, is_delayed, is_first, is_last) 200 return super(Br, self).getAllocator(*microFlags) 201 202 class Eret(SeqOp): 203 target = "normalMicroPC(0)" 204 className = "Eret" 205 206 def __init__(self, flags=None): 207 if flags: 208 if not isinstance(flags, (list, tuple)): 209 raise Exception, "flags must be a list or tuple of flags" 210 self.cond = " | ".join(flags) 211 self.className += "Flags" 212 else: 213 self.cond = "0" 214 215 def getAllocator(self, *microFlags): 216 (is_micro, is_delayed, is_first, is_last) = microFlags 217 is_last = True |
218 is_delayed = False |
219 microFlags = (is_micro, is_delayed, is_first, is_last) 220 return super(Eret, self).getAllocator(*microFlags) 221 222 iop = InstObjParams("br", "MicroBranchFlags", "SeqOpBase", 223 {"code": "nuIP = target", 224 "else_code": "nuIP = nuIP", 225 "cond_test": "checkCondition(ccFlagBits, cc)"}) 226 exec_output += SeqOpExecute.subst(iop) --- 25 unchanged lines hidden --- |