Interface IEAssign
- All Superinterfaces:
IEGeneric
,IEStatement
,IInstruction
,IInstructionOperand
,IResizableInstruction
The only valid destination operands of an EAssign are:
- EVar
, including PC
- EMem
- ESlice(any_of_the_above_recursively_except_PC)
- ECompose(any_of_the_above_recursively_except_PC)
- EGroupElt
Examples of valid destinations:
- REG1, REG2
- [REG1], [any_memory_address]
- ESlice(REG1), ESlice(ESlice(REG2))
- ECompose(REG1, REG2, REG3)
The following are illegal destinations:
- EImm, ERange or any other irrelevant IRE for a destination-of-assignment position
- ESlice(PC, REG1)
- EComposition(REGX, PC, ...)
-
Field Summary
Fields inherited from interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStatement
FLAG_LIKELY_EPILOGUE, FLAG_LIKELY_PROLOGUE, FLAG_OPT_BLOCK_PROPAGATION, FLAG_OPT_BLOCK_SUBSTITUTIONS
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Downgrade a call-to-sub to a simple flow-breaker.duplicateWithNewOperands
(IEGeneric dst, IEGeneric src) Retrieve the branching details of a PC-assign, if any.getBranchDetails
(boolean createIfNecessary) Get or create the branching details of a PC-assign.getBreakingFlow
(long instructionAddress, boolean keepNativeAddresses) Retrieve the destination operand of this assignment.Retrieve the destination operand of this assignment.Retrieve the source operand of this assignment.Retrieve the source operand of this assignment.boolean
boolean
boolean
boolean
boolean
setBranchDetails
(IEBranchDetails branchDetails) Set branching instructions for a PC-assign.boolean
upgradeBreakToCall
(long instructionAddress) Upgrade a flow-breaker to a call-to-sub or potential (non-returning) call-to-sub.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, copyProperties, countSuccessiveBits, duplicate, equalsEx, evaluate, evaluateAddress, evaluateUnsignedLong, examine, find, findByType, findByType, findParent, findParent, 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.asm.decompiler.ir.IEStatement
addLowerLevelAddress, addLowerLevelAddresses, asAssign, asCall, asJump, asJumpFar, asNop, asReturn, asSwitch, asUntranslated, collectSubExpressions, collectSubExpressions, collectUsedExpressions, copyLowerLevelAddresses, copyProperties, equalsEx, equalsEx, generateC, getContext, getDefUse, getDefUseInfo, getLowerLevelAddresses, getPrimaryLowerLevelAddress, getSPDelta, isAssign, isAssignTo, isAssignTo, isAssignToVar, isCall, isConditionalJump, isConditionalJumpFar, isJump, isJumpFar, isNop, isReturn, isSwitch, isUnconditionalJump, isUnconditionalJumpFar, isUntranslatedInstruction, postUpdateTypes, preUpdateTypes, removeLowerLevelAddress, replaceDefinedVar, replaceUsedVar, replaceVar, resetLowerLevelAddress, resetLowerLevelAddresses, setLowerLevelAddress, setLowerLevelAddresses, setPrimaryLowerLevelAddress, setSPDelta, visitInstruction, visitInstruction, visitInstructionPostOrder, withLowerLevelAddress, withLowerLevelAddresses, writesMemory
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.IInstruction
canThrow, collectIndirectCallReferences, format, getACS, getBreakingFlow, getCode, getCountOfOperands, getDefUse, getDefUse, getInstructionFlags, getMnemonic, getOperand, getOperands, getPrefix, getPrimaryBranchAddress, getProcessorMode, getRoutineCall, getSize
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.IInstructionOperand
format
Methods inherited from interface com.pnfsoftware.jeb.core.units.code.IResizableInstruction
adjustSize, setSize
-
Method Details
-
getDstOperand
IEGeneric getDstOperand()Retrieve the destination operand of this assignment.- Returns:
-
getSrcOperand
IEGeneric getSrcOperand()Retrieve the source operand of this assignment.- Returns:
-
getLeftOperand
IEGeneric getLeftOperand()Retrieve the destination operand of this assignment.- Returns:
-
getRightOperand
IEGeneric getRightOperand()Retrieve the source operand of this assignment.- Returns:
-
isBranching
boolean isBranching()- Returns:
-
isBreakingFlow
boolean isBreakingFlow()- Returns:
- true if this IR is a simple flow-breaker PC-assign
-
isRoutineCall
boolean isRoutineCall()- Returns:
- true if this IR is a call-to-sub PC-assign
-
isTentativeCall
boolean isTentativeCall()- Returns:
- true if this IR is a tentative call-to-sub PC-assign (this method will
return false if
isRoutineCall()
returns false)
-
upgradeBreakToCall
boolean upgradeBreakToCall(long instructionAddress) Upgrade a flow-breaker to a call-to-sub or potential (non-returning) call-to-sub. The source cannot be a conditional IR. If the target is unknown, the PC-assign may be converted to a potential call; if there there is a single target matching the fall-through instruction, the PC-assign may be converted to a call; else the method will fail.On success, all data flow analysis objects are automatically invalidated.
- Returns:
- success indicator
-
downgradeCallToBreak
boolean downgradeCallToBreak()Downgrade a call-to-sub to a simple flow-breaker. The source cannot be a conditional IR. Important! The caller is responsible for updating the CFG to maintain consistency with the IR, e.g. the fall-through edge may have to be removed.On success, all data flow analysis objects are automatically invalidated.
- Returns:
- success indicator
-
getBreakingFlow
- Parameters:
instructionAddress
-keepNativeAddresses
-- Returns:
-
getBranchDetails
IEBranchDetails getBranchDetails()Retrieve the branching details of a PC-assign, if any.- Returns:
- may be null
-
getBranchDetails
Get or create the branching details of a PC-assign.If a creation is necessary, the newly-created branch-details object is attached to this statement (and it will be returned by subsequent calls to
getBranchDetails()
), and all data flow analysis objects are automatically invalidated.- Parameters:
createIfNecessary
-- Returns:
- never null
-
setBranchDetails
Set branching instructions for a PC-assign.When setting this value, all data flow analysis objects are automatically invalidated.
- Parameters:
branchDetails
-- Returns:
- change indicator
-
duplicateWithNewOperands
-
evaluate
-