seqop.isa (5663:be5cb9485aed) seqop.isa (5692:0d6addcde185)
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
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
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
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
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)

--- 25 unchanged lines hidden ---
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 ---