angr.go.optimization_passes.multi_value

class angr.go.optimization_passes.multi_value.GoRetExprRewriter

Bases: RetExprRewriter

Give calls to functions with several results a combo-register return expression.

NAME = 'Rewrite return expressions of calls to Go functions with several results'
FLAVOR = 'go'
class angr.go.optimization_passes.multi_value.GoComboRegisterRewriter

Bases: ComboRegisterRewriter

Fold register pairs that make up one combo-register parameter back into that parameter.

NAME = 'Rewrite combo-register parameter references'
class angr.go.optimization_passes.multi_value.GoCallResultBinder

Bases: OptimizationPass

Bind every result register a caller reads after a call to the call’s result when the callee’s results are only guessed (or the callee is unknown: interface methods, closures). ABIInternal clobbers all result registers at a call, so a read of rbx/x1 before any write after the call is the call’s second result; the same holds for the float result registers (xmm0, xmm1, …), which Go numbers independently. Direct callees learn the word count (and bool for words only read as a byte) through kb.go_signatures; indirect calls get a combo-register result and a call-site prototype.

ARCHES = None
PLATFORMS = None
STAGE: OptimizationPassStage = 1
NAME = 'Bind the result registers callers read after Go calls'
__init__(func, manager, **kwargs)