Class MultExpressionSolver
- java.lang.Object
-
- ghidra.app.plugin.assembler.sleigh.expr.AbstractExpressionSolver<T>
-
- ghidra.app.plugin.assembler.sleigh.expr.AbstractBinaryExpressionSolver<MultExpression>
-
- ghidra.app.plugin.assembler.sleigh.expr.MultExpressionSolver
-
public class MultExpressionSolver extends AbstractBinaryExpressionSolver<MultExpression>
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 MultExpressionSolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MaskedLong
compute(MaskedLong lval, MaskedLong rval)
Compute the result of applying the operator to the two given valuesMaskedLong
computeLeft(MaskedLong rval, MaskedLong goal)
Compute the left-hand-side value given that the result and the right are knownprotected AssemblyResolution
solveLeftSide(PatternExpression lexp, MaskedLong rval, 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)
protected AssemblyResolution
solveRightSide(PatternExpression rexp, MaskedLong lval, 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)
protected AssemblyResolution
tryRep(PatternExpression lexp, MaskedLong rval, MaskedLong repGoal, 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
computeRight, getInstructionLength, getValue, solve, solveTwoSided, valueForResolution
-
Methods inherited from class ghidra.app.plugin.assembler.sleigh.expr.AbstractExpressionSolver
register
-
-
-
-
Method Detail
-
tryRep
protected AssemblyResolution tryRep(PatternExpression lexp, MaskedLong rval, MaskedLong repGoal, 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
- Throws:
NeedsBackfillException
-
solveLeftSide
protected AssemblyResolution solveLeftSide(PatternExpression lexp, MaskedLong rval, 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:
solveLeftSide
in classAbstractBinaryExpressionSolver<MultExpression>
- Throws:
NeedsBackfillException
SolverException
-
solveRightSide
protected AssemblyResolution solveRightSide(PatternExpression rexp, MaskedLong lval, 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:
solveRightSide
in classAbstractBinaryExpressionSolver<MultExpression>
- Throws:
NeedsBackfillException
SolverException
-
computeLeft
public MaskedLong computeLeft(MaskedLong rval, MaskedLong goal) throws SolverException
Description copied from class:AbstractBinaryExpressionSolver
Compute the left-hand-side value given that the result and the right are known- Specified by:
computeLeft
in classAbstractBinaryExpressionSolver<MultExpression>
- Parameters:
rval
- the right-hand-side valuegoal
- the result- Returns:
- the left-hand-side value solution
- Throws:
SolverException
- if the expression cannot be solved
-
compute
public MaskedLong compute(MaskedLong lval, MaskedLong rval)
Description copied from class:AbstractBinaryExpressionSolver
Compute the result of applying the operator to the two given values- Specified by:
compute
in classAbstractBinaryExpressionSolver<MultExpression>
- Parameters:
lval
- the left-hand-side valuerval
- the right-hand-side value- Returns:
- the result
-
-