Interface IEVar
- All Superinterfaces:
Comparable<IVariable>
,IEGeneric
,IInstructionOperand
,ISegment<Integer>
,IVariable
Representation of an IR variable. Also a polymorphic placeholder for a variety of terminal
expressions.
Variables can represent underlying physical registers, virtual registers, local variables, global
variables, etc. The class of an IEVar can be retrieved from its id
. Global-scope
(IEGlobalContext
) ids are positive or zero; local-scope (IERoutineContext
) ids
are negative.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Variables with this flag are stack variables likely to be copies of input parameters, that may have been provided in physical registers.static final int
Variables with this flag are stack variables likely to be defensive copies of registers that need to be preserved.static final int
This variable should not be copied: duplicates, pairs, splits generally created during SSA- or SSA-like passes are forbidden.static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Start of full range for copy variables.static final int
SOR for additional (secondary) duplicates of IEVar-registers.static final int
EOR for additional (secondary) duplicates of IEVar-registers.static final int
SOR for duplicates (mirrors and secondary duplicates).static final int
EOR for duplicates (mirrors and secondary duplicates).static final int
End of full range for copy variables.static final int
SOR for copies that consist of mergers of 2 or more IEVar-registers.static final int
EOR for copies that consist of mergers of 2 or more IEVar-registers.static final int
SOR for partial (truncated, slices) copies of IEVar-registers.static final int
EOR for partial (truncated, slices) copies of IEVar-registers.static final int
static final int
SOR for primary duplicates (primary dup.static final int
EOR for primary duplicates (primary dup.static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Start of range for stack-variable references.static final int
End of range for stack-variable references.static final int
static final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copyProperties
(IEVar dst) generateC
(IERoutineContext ectx, ICMethod cctx, int position) Specialized C Variable generator, allowing the specification of the variable position within its containing expression.generateC
(IERoutineContext ectx, ICMethod cctx, int position, boolean deref) Specialized C Variable generator, allowing the specification of the variable position within its containing expression.int
getId()
getName()
default boolean
isCopy()
default boolean
default boolean
default boolean
default boolean
default boolean
default boolean
default boolean
default boolean
default boolean
boolean
default boolean
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric
accessesMemory, addFlags, asCompose, asCond, asGroup, asGroupElt, asImm, asMem, asOperation, asRange, asSlice, asStatement, asVar, bit, collectSubExpressions, copyProperties, countSuccessiveBits, duplicate, equalsEx, evaluate, evaluateAddress, evaluateUnsignedLong, examine, find, findByType, findByType, findParent, findParent, generateC, getBitsize, getDefinedOrUsedAsDestination, getExplicitlyUsed, getExplicitlyUsed, getFlags, getPriority, getSafeType, getType, getUsed, getUsed, half, hasFlags, isCompose, isCond, isGroup, isGroupElt, isImm, isMem, isOperation, isOperation, isOperation, isOperation, isRange, isSlice, isSlice, isStatement, isVar, isVar, leftShift, leftShift, lsb, msb, part, removeFlags, replaceSubExpression, replaceVar, rightShift, rightShift, safelyType, setFlags, setType, setType, setType, signExtend, slice, slice, slice, topHalf, updateTypes, verify, visitDepthPost, visitDepthPost, visitDepthPost, visitDepthPre, visitDepthPre, visitDepthPre, zeroExtend
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.IInstructionOperand
format
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.IVariable
getBitFromId, getBitsize, getIdFromBit, getIds
-
Field Details
-
FLAG_NO_COPY
static final int FLAG_NO_COPYThis variable should not be copied: duplicates, pairs, splits generally created during SSA- or SSA-like passes are forbidden. The original var should be used (and therefore, types are unlikely to be applied to it.)- See Also:
-
FLAG_LIKELY_SAVED_VAR
static final int FLAG_LIKELY_SAVED_VARVariables with this flag are stack variables likely to be defensive copies of registers that need to be preserved.Such variables should not be treated as local vars when it comes to may-use/may-def calculations for statements that access memory, such as EMem or ECall. That yields cleaner conservative data chains.
- See Also:
-
FLAG_LIKELY_COPIED_PARAM
static final int FLAG_LIKELY_COPIED_PARAMVariables with this flag are stack variables likely to be copies of input parameters, that may have been provided in physical registers.SUch variables should not be treated as local vars when it comes to may-use/may-def calculations for statements that access memory, such as EMem or ECall. That yields cleaner conservative data chains.
- See Also:
-
ID_BEGIN
static final int ID_BEGIN- See Also:
-
ID_END
static final int ID_END- See Also:
-
ID_PHYSICAL_REGISTER
static final int ID_PHYSICAL_REGISTER- See Also:
-
ID_PHYSICAL_REGISTER_END
static final int ID_PHYSICAL_REGISTER_END- See Also:
-
ID_VIRTUAL_REGISTER
static final int ID_VIRTUAL_REGISTER- See Also:
-
ID_VIRTUAL_REGISTER_END
static final int ID_VIRTUAL_REGISTER_END- See Also:
-
ID_REGISTER
static final int ID_REGISTER- See Also:
-
ID_REGISTER_END
static final int ID_REGISTER_END- See Also:
-
REGISTER_RANGE_SIZE
static final int REGISTER_RANGE_SIZE- See Also:
-
ID_SYMBOL
static final int ID_SYMBOL- See Also:
-
ID_SYMBOL_END
static final int ID_SYMBOL_END- See Also:
-
ID_MEMVAR
static final int ID_MEMVAR- See Also:
-
ID_MEMVAR_END
static final int ID_MEMVAR_END- See Also:
-
ID_PSEUDO_VAR
static final int ID_PSEUDO_VAR- See Also:
-
IDL_PSEUDO_VAR
static final int IDL_PSEUDO_VAR- See Also:
-
IDL_PSEUDO_VAR_END
static final int IDL_PSEUDO_VAR_END- See Also:
-
IDL_SPECIAL
static final int IDL_SPECIAL- See Also:
-
IDL_SPECIAL_END
static final int IDL_SPECIAL_END- See Also:
-
IDL_MIRROR
static final int IDL_MIRRORSOR for primary duplicates (primary dup. = "mirror") of IEVar-registers. Note that the range must have same size as the full register range.- See Also:
-
IDL_MIRROR_END
static final int IDL_MIRROR_ENDEOR for primary duplicates (primary dup. = "mirror") of IEVar-registers. Note that the range must have same size as the full register range.- See Also:
-
IDL_COPY_DUP2
static final int IDL_COPY_DUP2SOR for additional (secondary) duplicates of IEVar-registers.- See Also:
-
IDL_COPY_DUP2_END
static final int IDL_COPY_DUP2_ENDEOR for additional (secondary) duplicates of IEVar-registers.- See Also:
-
IDL_COPY_MERGER
static final int IDL_COPY_MERGERSOR for copies that consist of mergers of 2 or more IEVar-registers.- See Also:
-
IDL_COPY_MERGER_END
static final int IDL_COPY_MERGER_ENDEOR for copies that consist of mergers of 2 or more IEVar-registers.- See Also:
-
IDL_COPY_SLICE
static final int IDL_COPY_SLICESOR for partial (truncated, slices) copies of IEVar-registers.- See Also:
-
IDL_COPY_SLICE_END
static final int IDL_COPY_SLICE_ENDEOR for partial (truncated, slices) copies of IEVar-registers.- See Also:
-
IDL_COPY_DUPFULL
static final int IDL_COPY_DUPFULLSOR for duplicates (mirrors and secondary duplicates).- See Also:
-
IDL_COPY_DUPFULL_END
static final int IDL_COPY_DUPFULL_ENDEOR for duplicates (mirrors and secondary duplicates).- See Also:
-
IDL_COPY
static final int IDL_COPYStart of full range for copy variables. The full range consists of: duplicates (mirrors + secondary duplicates), mergers, and slices.- See Also:
-
IDL_COPY_END
static final int IDL_COPY_ENDEnd of full range for copy variables. The full range consists of: duplicates (mirrors + secondary duplicates), mergers, and slices.- See Also:
-
IDL_SYMBOL
static final int IDL_SYMBOLStart of range for stack-variable references.- See Also:
-
IDL_SYMBOL_END
static final int IDL_SYMBOL_ENDEnd of range for stack-variable references.- See Also:
-
IDL_VIRTUAL
static final int IDL_VIRTUAL- See Also:
-
IDL_VIRTUAL_END
static final int IDL_VIRTUAL_END- See Also:
-
IDL_STACKVAR
static final int IDL_STACKVAR- See Also:
-
IDL_STACKVAR_BASE
static final int IDL_STACKVAR_BASE- See Also:
-
IDL_STACKVAR_END
static final int IDL_STACKVAR_END- See Also:
-
IDL_BEGIN
static final int IDL_BEGIN- See Also:
-
IDL_END
static final int IDL_END- See Also:
-
-
Method Details
-
isTypeable
boolean isTypeable()- Returns:
-
copyProperties
- Parameters:
dst
-
-
generateC
Specialized C Variable generator, allowing the specification of the variable position within its containing expression.- Parameters:
ectx
-cctx
-position
- variable "position": 0=unknown, 1=left-side of EAssign, 2=function parameter- Returns:
-
generateC
Specialized C Variable generator, allowing the specification of the variable position within its containing expression.- Parameters:
ectx
-cctx
-position
- variable "position": 0=unknown, 1=left-side of EAssign, 2=function parameterderef
- generate a dereferenced version of the variable- Returns:
-
getId
int getId() -
getName
String getName() -
getAddress
Long getAddress() -
isPhysicalRegister
default boolean isPhysicalRegister() -
isVirtualRegister
default boolean isVirtualRegister() -
isRegister
default boolean isRegister() -
isGlobalVariable
default boolean isGlobalVariable() -
isGlobalReference
default boolean isGlobalReference() -
isRoutineScope
default boolean isRoutineScope() -
isPseudoVar
default boolean isPseudoVar() -
isCopy
default boolean isCopy() -
isStackVariable
default boolean isStackVariable() -
isStackReference
default boolean isStackReference() -
isReference
default boolean isReference()
-