(il:LowLevelILFunction, cond:ExpressionIndex, dest:ExpressionIndex)
| 400 | |
| 401 | @staticmethod |
| 402 | def cond_branch(il:LowLevelILFunction, cond:ExpressionIndex, dest:ExpressionIndex) -> None: |
| 403 | t = None |
| 404 | instr = LowLevelILInstruction.create(il, dest) |
| 405 | if isinstance(instr, LowLevelILConst): |
| 406 | t = il.get_label_for_address(Architecture['6502'], instr.constant) # type: ignore |
| 407 | if t is None: |
| 408 | t = LowLevelILLabel() |
| 409 | indirect = True |
| 410 | else: |
| 411 | indirect = False |
| 412 | f = LowLevelILLabel() |
| 413 | il.append(il.if_expr(cond, t, f)) |
| 414 | if indirect: |
| 415 | il.mark_label(t) |
| 416 | il.append(il.jump(dest)) |
| 417 | il.mark_label(f) |
| 418 | return None |
| 419 | |
| 420 | @staticmethod |
| 421 | def jump(il:LowLevelILFunction, dest:ExpressionIndex) -> None: |
no test coverage detected