(il:LowLevelILFunction, value:ExpressionIndex)
| 373 | |
| 374 | @staticmethod |
| 375 | def load_zero_page_16(il:LowLevelILFunction, value:ExpressionIndex) -> ExpressionIndex: |
| 376 | instr = LowLevelILInstruction.create(il, value) |
| 377 | if isinstance(instr, LowLevelILConst): |
| 378 | if instr.constant == 0xff: |
| 379 | lo = il.zero_extend(2, il.load(1, il.const_pointer(2, 0xff))) |
| 380 | hi = il.shift_left(2, il.zero_extend(2, il.load(1, il.const_pointer(2, 0))), il.const(2, 8)) |
| 381 | return il.or_expr(2, lo, hi) |
| 382 | return il.load(2, il.const_pointer(2, instr.constant)) |
| 383 | il.append(il.set_reg(1, LLIL_TEMP(0), value)) |
| 384 | expr = il.reg(1, LLIL_TEMP(0)) |
| 385 | lo_addr = expr |
| 386 | hi_addr = il.add(1, expr, il.const(1, 1)) |
| 387 | lo = il.zero_extend(2, il.load(1, lo_addr)) |
| 388 | hi = il.shift_left(2, il.zero_extend(2, il.load(1, hi_addr)), il.const(2, 8)) |
| 389 | return il.or_expr(2, lo, hi) |
| 390 | |
| 391 | @staticmethod |
| 392 | def indirect_load(il:LowLevelILFunction, value:int) -> ExpressionIndex: |
no test coverage detected