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 --- 184 unchanged lines hidden (view full) --- 193 className = "MicroBranch" 194 195 def getAllocator(self, *microFlags): 196 (is_micro, is_delayed, is_first, is_last) = microFlags 197 is_last = False 198 microFlags = (is_micro, is_delayed, is_first, is_last) 199 return super(Br, self).getAllocator(*microFlags) 200 |
201 class Eret(SeqOp): 202 target = "normalMicroPC(0)" 203 className = "Eret" 204 205 def __init__(self, flags=None): 206 if flags: 207 if not isinstance(flags, (list, tuple)): 208 raise Exception, "flags must be a list or tuple of flags" 209 self.cond = " | ".join(flags) 210 self.className += "Flags" 211 else: 212 self.cond = "0" 213 214 def getAllocator(self, *microFlags): 215 (is_micro, is_delayed, is_first, is_last) = microFlags 216 is_last = True 217 microFlags = (is_micro, is_delayed, is_first, is_last) 218 return super(Eret, self).getAllocator(*microFlags) 219 |
220 iop = InstObjParams("br", "MicroBranchFlags", "SeqOpBase", 221 {"code": "nuIP = target", 222 "else_code": "nuIP = nuIP", 223 "cond_test": "checkCondition(ccFlagBits, cc)"}) 224 exec_output += SeqOpExecute.subst(iop) 225 header_output += SeqOpDeclare.subst(iop) 226 decoder_output += SeqOpConstructor.subst(iop) 227 iop = InstObjParams("br", "MicroBranch", "SeqOpBase", 228 {"code": "nuIP = target", 229 "else_code": "nuIP = nuIP", 230 "cond_test": "true"}) 231 exec_output += SeqOpExecute.subst(iop) 232 header_output += SeqOpDeclare.subst(iop) 233 decoder_output += SeqOpConstructor.subst(iop) 234 microopClasses["br"] = Br |
235 236 iop = InstObjParams("eret", "EretFlags", "SeqOpBase", 237 {"code": "", "else_code": "", 238 "cond_test": "checkCondition(ccFlagBits, cc)"}) 239 exec_output += SeqOpExecute.subst(iop) 240 header_output += SeqOpDeclare.subst(iop) 241 decoder_output += SeqOpConstructor.subst(iop) 242 iop = InstObjParams("eret", "Eret", "SeqOpBase", 243 {"code": "", "else_code": "", 244 "cond_test": "true"}) 245 exec_output += SeqOpExecute.subst(iop) 246 header_output += SeqOpDeclare.subst(iop) 247 decoder_output += SeqOpConstructor.subst(iop) 248 microopClasses["eret"] = Eret |
249}}; |