com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric |
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean | accessesMemory() | ||||||||||
abstract IEGeneric | bit(int pos) | ||||||||||
abstract IECond |
countSuccessiveBits(boolean ones, boolean fromMsb, int bitsize)
Count successive bits in an integer, starting from MSB or LSB.
| ||||||||||
abstract IEGeneric |
duplicate()
Clone (deep copy) the expression.
| ||||||||||
abstract IEImm |
evaluate(IEState state)
Evaluate the IRE.
| ||||||||||
abstract long |
evaluateA(IEState state)
Evaluate the IRE as a 64-bit address;
| ||||||||||
abstract long |
evaluateL(IEState state)
Evaluate the IRE as an unsigned long value.
| ||||||||||
abstract int |
getBitsize()
Get the size, in bits, of the IR expression.
| ||||||||||
abstract void |
getDefinedOrUsedVarsAsDestination(List<IEVar> def, List<IEVar> use)
For non-
IEStatement IREs only. | ||||||||||
abstract void |
getExplicitlyUsedVars(List<IEVar> use)
Get a list of variables 'explicitly used' (read) by the instruction.
| ||||||||||
abstract int |
getPriority()
Get the base priority level of the expression.
| ||||||||||
abstract void |
getSubExpressions(List<IEGeneric> list)
Shallow collection.
| ||||||||||
abstract void |
getUsedVars(List<IEVar> use)
Get a list of variables 'used' (read) by the instruction.
| ||||||||||
abstract IEGeneric | leftShift(int shift) | ||||||||||
abstract IEGeneric | leftShift(int shift, int bitSize) | ||||||||||
abstract IEGeneric | lsb() | ||||||||||
abstract IEGeneric | msb() | ||||||||||
abstract IEGeneric | part(int cnt) | ||||||||||
abstract boolean |
replaceSubExpression(IEGeneric oldExp, IEGeneric newExp)
Shallow replacement, by reference.
| ||||||||||
abstract int |
replaceVar(IEVar var, IEGeneric repl)
Deep replace.
| ||||||||||
abstract IEGeneric | rightShift(int shift) | ||||||||||
abstract IEGeneric | rightShift(int shift, int bitsize) | ||||||||||
abstract IEGeneric | signExtend(int newBitsize, boolean duplicate) | ||||||||||
abstract IEGeneric |
signExtend(int newBitsize)
Sign extend the current IRE
| ||||||||||
abstract IEGeneric | slice(IERange r) | ||||||||||
abstract IEGeneric | slice(int begin, int end) | ||||||||||
abstract void |
verify()
Verify the legality of this IR expression.
| ||||||||||
abstract boolean |
visitDepthPost(IEVisitor visitor, IEGeneric parent)
Depth-first search, post-order visit of an expression tree or sub-tree.
| ||||||||||
abstract boolean | visitDepthPost(IEVisitor visitor) | ||||||||||
abstract boolean |
visitDepthPre(IEVisitor visitor, IEGeneric parent)
Depth-first search, pre-order visit of an expression tree or sub-tree.
| ||||||||||
abstract boolean | visitDepthPre(IEVisitor visitor) | ||||||||||
abstract IEGeneric |
zeroExtend(int newBitsize)
Zero extend the current IRE
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Count successive bits in an integer, starting from MSB or LSB.
ones | true if '1's should be counted, false for '0's |
---|---|
fromMsb | true if count should start from MSB, false from LSB |
Clone (deep copy) the expression.
Evaluate the IRE.
state | IR state (input and output) |
---|
Evaluate the IRE as an unsigned long value. This convenience method will throw if the underlying immediate bit size exceeds 63 bits (unsigned value). TODO: rename to evaluateUL
Get the size, in bits, of the IR expression. It is illegal to query The bitsize of some expressions.
For non-IEStatement
IREs only. Assuming 'this' is a destination value, extract the
vars that are used and defined by it.
def | list of variables that are defined (will be populated) |
---|---|
use | list of variables that are used (will be populated) |
Get a list of variables 'explicitly used' (read) by the instruction. This method is
inherently deep. The default implementation calls getUsedVars(List)
. IRE using
implicit used vars must override this method.
Get the base priority level of the expression. Higher number correlates to lower priority; 0 means "no priority". (Therefore, the highest priority level is 1.)
Shallow collection. Appends to `list` (existing elements are not cleared). The current element (this) is not appended, only the descendants are considered.
list | non-null output list |
---|
Get a list of variables 'used' (read) by the instruction. This method is inherently deep.
Note that some statements are made of "implicitly used" variables, ie, IEVar
s that are
not explicit constituents of the statement expression (eg, some PC-IEAssign
or
IEUntranslatedInstruction
). This method returns those implicit uses.
use | non-null output list, should not contain duplicates |
---|
Shallow replacement, by reference. Only the first occurrence is replaced.@return
Deep replace. All matching variables
are replaced. The implementation is
responsible for duplicating the IR expressions, to ensure that the resulting statement or
group of statement does not contain duplicate references to mutable objects.
Sign extend the current IRE
newBitsize | must be superior to IRE#getBitsize() |
---|
Verify the legality of this IR expression.
IllegalIntermediateExpressionException | if the IRE is deemed invalid or illegal |
---|
Depth-first search, post-order visit of an expression tree or sub-tree. The node being visited may be replaced without notifying the visitor.
visitor | the visitor object |
---|
Depth-first search, pre-order visit of an expression tree or sub-tree. The node being visited may be replaced, but the client code is responsible for EVisitResults#setReplacedNode(IRE) notifying the visitor.
visitor | the visitor object |
---|
Zero extend the current IRE
newBitsize | must be superior to IRE#getBitsize() |
---|