Package ghidra.app.plugin.assembler.sleigh.expr

# Class RightShiftExpressionSolver

java.lang.Object
ghidra.app.plugin.assembler.sleigh.expr.AbstractExpressionSolver<RightShiftExpression>
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

  `solver`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RightShiftExpressionSolver()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `MaskedLong`
  `compute(MaskedLong lval, MaskedLong rval)`
  Compute the result of applying the operator to the two given values
  `MaskedLong`
  `computeLeft(MaskedLong rval, MaskedLong goal)`
  Compute the left-hand-side value given that the result and the right are known
  `MaskedLong`
  `computeRight(MaskedLong lval, MaskedLong goal)`
  Compute the right-hand-side value given that the result and the left are known
  `protected AssemblyResolution`
  `solveTwoSided(AbstractAssemblyResolutionFactory<?,?> factory, RightShiftExpression exp, MaskedLong goal, Map<String,Long> vals, AssemblyResolvedPatterns cur, Set<SolverHint> hints, 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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### RightShiftExpressionSolver

    public RightShiftExpressionSolver()

- ## Method Details

  - ### 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 class `AbstractBinaryExpressionSolver<RightShiftExpression>`
    Parameters:
      `lval` - the left-hand-side value
      `rval` - the right-hand-side value
    Returns:
      the result

  - ### 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 class `AbstractBinaryExpressionSolver<RightShiftExpression>`
    Parameters:
      `rval` - the right-hand-side value
      `goal` - 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: `AbstractBinaryExpressionSolver`
    Compute the right-hand-side value given that the result and the left are known

    NOTE: Assumes commutativity by default

    Overrides:
      `computeRight` in class `AbstractBinaryExpressionSolver<RightShiftExpression>`
    Parameters:
      `lval` - the left-hand-side value
      `goal` - the result
    Returns:
      the right-hand-side value solution
    Throws:
      `SolverException` - if the expression cannot be solved

  - ### solveTwoSided

    protected AssemblyResolution solveTwoSided(AbstractAssemblyResolutionFactory<?,?> factory, RightShiftExpression exp, MaskedLong goal, Map<String,Long> vals, AssemblyResolvedPatterns cur, Set<SolverHint> hints, String description) throws NeedsBackfillException, SolverException
    Overrides:
      `solveTwoSided` in class `AbstractBinaryExpressionSolver<RightShiftExpression>`
    Throws:
      `NeedsBackfillException`
      `SolverException`