Class RightShiftExpressionSolver
- java.lang.Object
-
- ghidra.app.plugin.assembler.sleigh.expr.AbstractExpressionSolver<T>
-
- ghidra.app.plugin.assembler.sleigh.expr.AbstractBinaryExpressionSolver<RightShiftExpression>
-
- ghidra.app.plugin.assembler.sleigh.expr.RightShiftExpressionSolver
-
public class RightShiftExpressionSolver extends AbstractBinaryExpressionSolver<RightShiftExpression>
Solves expressions of the form A >> B
-
-
Field Summary
-
Fields inherited from class ghidra.app.plugin.assembler.sleigh.expr.AbstractExpressionSolver
dbg, solver
-
-
Constructor Summary
Constructors Constructor Description RightShiftExpressionSolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MaskedLongcompute(MaskedLong lval, MaskedLong rval)Compute the result of applying the operator to the two given valuesMaskedLongcomputeLeft(MaskedLong rval, MaskedLong goal)Compute the left-hand-side value given that the result and the right are knownMaskedLongcomputeRight(MaskedLong lval, MaskedLong goal)Compute the right-hand-side value given that the result and the left are knownprotected AssemblyResolutionsolveTwoSided(RightShiftExpression exp, MaskedLong goal, java.util.Map<java.lang.String,java.lang.Long> vals, java.util.Map<java.lang.Integer,java.lang.Object> res, AssemblyResolvedConstructor cur, java.util.Set<SolverHint> hints, java.lang.String description)-
Methods inherited from class ghidra.app.plugin.assembler.sleigh.expr.AbstractBinaryExpressionSolver
getInstructionLength, getValue, solve, solveLeftSide, solveRightSide, valueForResolution
-
Methods inherited from class ghidra.app.plugin.assembler.sleigh.expr.AbstractExpressionSolver
register
-
-
-
-
Method Detail
-
compute
public MaskedLong compute(MaskedLong lval, MaskedLong rval)
Description copied from class:AbstractBinaryExpressionSolverCompute the result of applying the operator to the two given values- Specified by:
computein classAbstractBinaryExpressionSolver<RightShiftExpression>- Parameters:
lval- the left-hand-side valuerval- the right-hand-side value- Returns:
- the result
-
computeLeft
public MaskedLong computeLeft(MaskedLong rval, MaskedLong goal) throws SolverException
Description copied from class:AbstractBinaryExpressionSolverCompute the left-hand-side value given that the result and the right are known- Specified by:
computeLeftin classAbstractBinaryExpressionSolver<RightShiftExpression>- Parameters:
rval- the right-hand-side valuegoal- the result- Returns:
- the left-hand-side value solution
- Throws:
SolverException- if the expression cannot be solved
-
computeRight
public MaskedLong computeRight(MaskedLong lval, MaskedLong goal) throws SolverException
Description copied from class:AbstractBinaryExpressionSolverCompute the right-hand-side value given that the result and the left are known- Overrides:
computeRightin classAbstractBinaryExpressionSolver<RightShiftExpression>- Parameters:
lval- the left-hand-side valuegoal- the result- Returns:
- the right-hand-side value solution
- Throws:
SolverException- if the expression cannot be solved
-
solveTwoSided
protected AssemblyResolution solveTwoSided(RightShiftExpression exp, MaskedLong goal, java.util.Map<java.lang.String,java.lang.Long> vals, java.util.Map<java.lang.Integer,java.lang.Object> res, AssemblyResolvedConstructor cur, java.util.Set<SolverHint> hints, java.lang.String description) throws NeedsBackfillException, SolverException
- Overrides:
solveTwoSidedin classAbstractBinaryExpressionSolver<RightShiftExpression>- Throws:
NeedsBackfillExceptionSolverException
-
-