com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric |
![]() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean | accessesMemory() | ||||||||||
abstract IEGeneric |
bit(int pos)
Retrieve a one bit value at the pos position
| ||||||||||
abstract IEGeneric |
copyTypeFrom(IEGeneric src)
Copy the type of a source IR element, if any, to this element.
| ||||||||||
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 boolean |
equalsEx(Object obj, boolean includeType)
Same as #equals(Object) with the possibility to check type or not.
| ||||||||||
abstract IEImm |
evaluate(IEState state)
Evaluate the IRE.
| ||||||||||
abstract long |
evaluateAddress(IEState state)
Evaluate the IRE as a 64-bit address;@return
| ||||||||||
abstract long |
evaluateUnsignedLong(IEState state)
Evaluate the IRE as an unsigned long value.
| ||||||||||
abstract int |
getBitsize()
Get the size, in bits, of the IR expression.
| ||||||||||
abstract void |
getDefinedOrUsedAsDestination(IdRanges def, IdRanges use)
For
non-statements only. | ||||||||||
abstract void |
getExplicitlyUsed(IdRanges use)
Get a list of vbits '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 IWildcardType |
getType()
Get the currently set intermediate-type.
| ||||||||||
abstract void |
getUsed(IdRanges use)
Get a list of vbits 'used' (read) by the instruction.
| ||||||||||
abstract IEGeneric |
leftShift(int shift)
left shift of an expression
| ||||||||||
abstract IEGeneric |
leftShift(int shift, int bitSize)
left shift of an expression, with an optional
slice(int, int) | ||||||||||
abstract IEGeneric |
lsb()
Return the least significant bit (lsb) of an expression.
| ||||||||||
abstract IEGeneric |
msb()
Return the most significant bit (msb) of an expression.
| ||||||||||
abstract IEGeneric |
part(int cnt)
Equivalent to slice(0, 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)
right shift of an expression
| ||||||||||
abstract IEGeneric |
rightShift(int shift, int bitsize)
right shift of an expression, with an optional
slice(int, int) | ||||||||||
abstract boolean |
setType(IWildcardType type)
Set a pre-propagation intermediate-type.
| ||||||||||
abstract IEGeneric |
signExtend(int newBitsize)
Sign extend the current
IEGeneric . | ||||||||||
abstract IEGeneric | slice(IERange r) | ||||||||||
abstract IEGeneric |
slice(int begin, int end)
Slice (remove begin AND/OR end) of an
IEGeneric . | ||||||||||
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, IEGeneric parent, EVisitResults results)
Depth-first search, post-order visit of an expression tree or sub-tree.
| ||||||||||
abstract boolean |
visitDepthPost(IEVisitor visitor)
Depth-first search, post-order visit of an expression tree or sub-tree.
| ||||||||||
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)
Depth-first search, pre-order visit of an expression tree or sub-tree.
| ||||||||||
abstract boolean |
visitDepthPre(IEVisitor visitor, IEGeneric parent, EVisitResults results)
Depth-first search, pre-order visit of an expression tree or sub-tree.
| ||||||||||
abstract IEGeneric |
zeroExtend(int newBitsize)
Zero extend the current
IEGeneric |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Retrieve a one bit value at the pos position
pos | bit position to be retrieved |
---|
IEGeneric
of size 1 with bit at position pos
Copy the type of a source IR element, if any, to this element.
src | source element |
---|
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.
Same as #equals(Object) with the possibility to check type or not.
obj | object to compare |
---|---|
includeType | true for type comparison (same as #equals(Object)), false if ignoring type |
Evaluate the IRE.
state | IR state (input and output) |
---|
Exception | force client code to wrap calls for safe execution |
---|
Evaluate the IRE as a 64-bit address;@return
Exception | force client code to wrap calls for safe execution |
---|
Evaluate the IRE as an unsigned long value. This convenience method will throw if the underlying immediate bit size exceeds 63 bits (unsigned value).
Exception | force client code to wrap calls for safe execution |
---|
Get the size, in bits, of the IR expression. It is illegal to query The bitsize of some expressions.
For non-statements
only. Assuming 'this' is a destination value, extract
the vbits that are used and defined by it.
Get a list of vbits 'explicitly used' (read) by the instruction. This method is inherently deep.
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 vbits 'used' (read) by the instruction. This method is inherently deep.
Note that some statements are made of "implicitly used" vbits, such as instructions using
variables that are not explicit constituents of the statement expression (eg, some
PC-IEAssign
or IEUntranslatedInstruction
). This method returns those implicit
uses.
left shift of an expression
shift | left shift value |
---|
IEGeneric
left shifted by the shift value
left shift of an expression, with an optional slice(int, int)
shift | left shift value |
---|---|
bitSize | bitsize of the final IEGeneric . Note that the condition
(bitSize - shift < currentBitSize) must be respected. |
IEGeneric
left shifted by the shift value
Return the least significant bit (lsb) of an expression. No duplicate is done, it is up to
caller to duplicate current IEGeneric
if needed.
Return the most significant bit (msb) of an expression. No duplicate is done, it is up to
caller to duplicate current IEGeneric
if needed.
Equivalent to slice(0, cnt)
cnt | bitsize. Note that the condition (cnt < currentBitSize) must be
respected. |
---|
Shallow replacement, by reference. Only the first occurrence is replaced.
Be careful when replacing immediates or variables. Unexpected behaviors may happen if the expression contains multiple instances of the same imm or var.@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.
right shift of an expression
shift | right shift value |
---|
IEGeneric
right shifted by the shift value
right shift of an expression, with an optional slice(int, int)
shift | right shift value |
---|
IEGeneric
right shifted by the shift value
Set a pre-propagation intermediate-type. Does not propagate/update type in the super- or sub-expression.
type | the new type; may be null |
---|
Sign extend the current IEGeneric
. This method will create a valid IEGeneric
(meaning IEGeneric
will not have duplicates id - in particular, in the form C(x,
x.msb()?ones():zeros()) where x will be present in base value and msb predicate)
newBitsize | must be superior to getBitsize()
|
---|
Slice (remove begin AND/OR end) of an IEGeneric
.
begin | new beginning bit position. Note that the conditions
(begin > 0 AND begin < end) must be respected. |
---|---|
end | new end bit position. Note that the conditions
(end < currentBitSize AND begin < end) must be respected. |
IEGeneric
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.
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, post-order visit of an expression tree or sub-tree. The node being visited may be replaced without notifying the visitor.
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(IEGeneric) notifying the visitor.
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.
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 IEGeneric
newBitsize | must be superior to getBitsize()
|
---|