MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / indirect_load

Method indirect_load

python/examples/nes.py:392–399  ·  view source on GitHub ↗
(il:LowLevelILFunction, value:int)

Source from the content-addressed store, hash-verified

390
391 @staticmethod
392 def indirect_load(il:LowLevelILFunction, value:int) -> ExpressionIndex:
393 if (value & 0xff) == 0xff:
394 lo_addr = il.const_pointer(2, value)
395 hi_addr = il.const_pointer(2, (value & 0xff00) | ((value + 1) & 0xff))
396 lo = il.zero_extend(2, il.load(1, lo_addr))
397 hi = il.shift_left(2, il.zero_extend(2, il.load(1, hi_addr)), il.const(2, 8))
398 return il.or_expr(2, lo, hi)
399 return il.load(2, il.const_pointer(2, value))
400
401 @staticmethod
402 def cond_branch(il:LowLevelILFunction, cond:ExpressionIndex, dest:ExpressionIndex) -> None:

Callers 1

M6502Class · 0.80

Calls 6

const_pointerMethod · 0.45
zero_extendMethod · 0.45
loadMethod · 0.45
shift_leftMethod · 0.45
constMethod · 0.45
or_exprMethod · 0.45

Tested by

no test coverage detected