Class OperandValueSolver


  • public class OperandValueSolver
    extends AbstractExpressionSolver<OperandValue>
    Solves expressions of an operand value These are a sort of named sub-expression, but they may also specify a shift in encoding.
    • Constructor Detail

      • OperandValueSolver

        public OperandValueSolver()
    • Method Detail

      • getDefiningExpression NEW

        protected PatternExpression getDefiningExpression​(OperandSymbol sym)
        Obtains the "defining expression" This is either the symbols assigned defining expression, or the expression associated with its defining symbol.
        Returns:
        the defining expression, or null if neither is available
      • getInstructionLength

        public int getInstructionLength​(OperandValue ov,
                                        java.util.Map<java.lang.Integer,​java.lang.Object> res)
        Description copied from class: AbstractExpressionSolver
        Determines the length of the subconstructor that would be returned had the expression not depended on an undefined symbol. This is used by the backfilling process to ensure values are written to the correct offset
        Specified by:
        getInstructionLength in class AbstractExpressionSolver<OperandValue>
        Parameters:
        ov - the expression
        res - the results of subconstructor resolutions (used for lengths)
        Returns:
        the length of filled in token field(s).