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

Function SetRegisterOrNop

arch/mips/il.cpp:13–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11} ExtendType;
12
13static ExprId SetRegisterOrNop(LowLevelILFunction& il,
14 size_t size,
15 size_t registerSize,
16 uint32_t reg,
17 ExprId expr,
18 ExtendType extend = SignExtend)
19{
20 if (reg == REG_ZERO)
21 return il.Nop();
22 else
23 {
24 if (size < registerSize)
25 {
26 switch (extend)
27 {
28 case ZeroExtend:
29 expr = il.ZeroExtend(registerSize, expr);
30 break;
31 case SignExtend:
32 expr = il.SignExtend(registerSize, expr);
33 break;
34 }
35 }
36 return il.SetRegister(registerSize, reg, expr);
37 }
38}
39
40
41static void ConditionExecute(LowLevelILFunction& il, ExprId cond, ExprId trueCase, ExprId falseCase=INVALID_EXPRID)

Callers 2

WriteILOperandFunction · 0.85

Calls 4

SetRegisterMethod · 0.80
NopMethod · 0.45
ZeroExtendMethod · 0.45
SignExtendMethod · 0.45

Tested by

no test coverage detected