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

Method set_reg

python/lowlevelil.py:4200–4218  ·  view source on GitHub ↗

``set_reg`` sets the register ``reg`` of size ``size`` to the expression ``value`` :param int size: size of the register parameter in bytes :param str reg: the register name :param ExpressionIndex value: an expression to set the register to :param str flags: which flags are set by this o

(
	    self, size: int, reg: 'architecture.RegisterType', value: ExpressionIndex,
	    flags: Optional['architecture.FlagType'] = None, loc: Optional['ILSourceLocation'] = None
	)

Source from the content-addressed store, hash-verified

4198 return self.expr(LowLevelILOperation.LLIL_NOP, source_location=loc)
4199
4200 def set_reg(
4201 self, size: int, reg: 'architecture.RegisterType', value: ExpressionIndex,
4202 flags: Optional['architecture.FlagType'] = None, loc: Optional['ILSourceLocation'] = None
4203 ) -> ExpressionIndex:
4204 """
4205 ``set_reg`` sets the register ``reg`` of size ``size`` to the expression ``value``
4206
4207 :param int size: size of the register parameter in bytes
4208 :param str reg: the register name
4209 :param ExpressionIndex value: an expression to set the register to
4210 :param str flags: which flags are set by this operation
4211 :param ILSourceLocation loc: location of returned expression
4212 :return: The expression ``reg = value``
4213 :rtype: ExpressionIndex
4214 """
4215 _reg = ExpressionIndex(self.arch.get_reg_index(reg))
4216 if flags is None:
4217 flags = architecture.FlagIndex(0)
4218 return self.expr(LowLevelILOperation.LLIL_SET_REG, _reg, value, size=size, flags=flags, source_location=loc)
4219
4220 def set_reg_split(
4221 self, size: int, hi: 'architecture.RegisterType', lo: 'architecture.RegisterType', value: ExpressionIndex,

Callers 5

copy_expr_toMethod · 0.45
M6502Class · 0.45
load_zero_page_16Method · 0.45
set_p_valueMethod · 0.45
translate_instrFunction · 0.45

Calls 2

exprMethod · 0.95
get_reg_indexMethod · 0.80

Tested by

no test coverage detected