Interface StructuredSleigh.RVal

All Known Subinterfaces:
StructuredSleigh.LVal, StructuredSleigh.StmtWithVal, StructuredSleigh.Var
All Known Implementing Classes:
CallExpr, Expr, LiteralLongExpr, RawExpr
Enclosing class:
StructuredSleigh

protected static interface StructuredSleigh.RVal
A value which can only be used on the right-hand side of an assignment
  • Method Details

    • getType

      DataType getType()
      Get the type of the value
      Returns:
      the type
    • cast

      Cast the value to the given type

      This functions like a C-style pointer cast. There are no implied operations or conversions. Notably, casting between integers and floats is just a re-interpretation of the underlying bits.

      Parameters:
      type - the type
      Returns:
      a handle to the resulting value
    • deref

      Generate a dereference (in the C sense)

      The value is treated as an address, and the result is essentially a variable in the given target address space.

      Parameters:
      space - the address space of the result
      Returns:
      a handle to the resulting value
    • deref

      Generate a dereference (in the C sense) in the default address space
      Returns:
      a handle to the resulting value
    • notb

      Generate boolean inversion
      Returns:
      a handle to the resulting value
    • noti

      Generate integer (bitwise) inversion
      Returns:
      a handle to the resulting value
    • eq

      Generate integer comparison: equal to
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • eq

      StructuredSleigh.RVal eq(long rhs)
      Generate integer comparison: equal to
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • eqf

      Generate float comparison: equal to
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • neq

      Generate integer comparison: not equal to
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • neq

      StructuredSleigh.RVal neq(long rhs)
      Generate integer comparison: not equal to
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • neqf

      Generate float comparison: not equal to
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • ltiu

      Generate unsigned integer comparison: less than
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • ltiu

      StructuredSleigh.RVal ltiu(long rhs)
      Generate unsigned integer comparison: less than
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • ltis

      Generate signed integer comparison: less than
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • ltis

      StructuredSleigh.RVal ltis(long rhs)
      Generate signed integer comparison: less than
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • ltf

      Generate unsigned integer comparison: less than
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • gtiu

      Generate unsigned integer comparison: greater than
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • gtiu

      StructuredSleigh.RVal gtiu(long rhs)
      Generate unsigned integer comparison: greater than
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • gtis

      Generate signed integer comparison: greater than
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • gtis

      StructuredSleigh.RVal gtis(long rhs)
      Generate signed integer comparison: greater than
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • gtf

      Generate float comparison: greater than
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • lteiu

      Generate unsigned integer comparison: less than or equal to
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • lteiu

      StructuredSleigh.RVal lteiu(long rhs)
      Generate unsigned integer comparison: less than or equal to
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • lteis

      Generate signed integer comparison: less than or equal to
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • lteis

      StructuredSleigh.RVal lteis(long rhs)
      Generate signed integer comparison: less than or equal to
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • ltef

      Generate float comparison: less than or equal to
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • gteiu

      Generate unsigned integer comparison: greater than or equal to
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • gteiu

      StructuredSleigh.RVal gteiu(long rhs)
      Generate unsigned integer comparison: greater than or equal to
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • gteis

      Generate signed integer comparison: greater than or equal to
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • gteis

      StructuredSleigh.RVal gteis(long rhs)
      Generate signed integer comparison: greater than or equal to
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • gtef

      Generate float comparison: greater than or equal to
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • orb

      Generate boolean or
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • orb

      StructuredSleigh.RVal orb(long rhs)
      Generate boolean or
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • ori

      Generate an integer (bitwise) or
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • ori

      StructuredSleigh.RVal ori(long rhs)
      Generate an integer (bitwise) or
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • xorb

      Generate boolean exclusive or
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • xorb

      StructuredSleigh.RVal xorb(long rhs)
      Generate boolean exclusive or
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • xori

      Generate an integer (bitwise) exclusive or
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • xori

      StructuredSleigh.RVal xori(long rhs)
      Generate an integer (bitwise) exclusive or
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • andb

      Generate boolean and
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • andb

      StructuredSleigh.RVal andb(long rhs)
      Generate boolean and
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • andi

      Generate an integer (bitwise) and
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • andi

      StructuredSleigh.RVal andi(long rhs)
      Generate an integer (bitwise) and
      Parameters:
      rhs - the immediate operand (mask)
      Returns:
      a handle to the resulting value
    • shli

      Generate bit shift to the left
      Parameters:
      rhs - the second operand (shift amount)
      Returns:
      a handle to the resulting value
    • shli

      StructuredSleigh.RVal shli(long rhs)
      Generate bit shift to the left
      Parameters:
      rhs - the immediate operand (shift amount)
      Returns:
      a handle to the resulting value
    • shriu

      Generate unsigned bit shift to the right
      Parameters:
      rhs - the second operand (shift amount)
      Returns:
      a handle to the resulting value
    • shriu

      StructuredSleigh.RVal shriu(long rhs)
      Generate unsigned bit shift to the right
      Parameters:
      rhs - the immediate operand (shift amount)
      Returns:
      a handle to the resulting value
    • shris

      Generate signed bit shift to the right
      Parameters:
      rhs - the second operand (shift amount)
      Returns:
      a handle to the resulting value
    • shris

      StructuredSleigh.RVal shris(long rhs)
      Generate signed bit shift to the right
      Parameters:
      rhs - the immediate operand (shift amount)
      Returns:
      a handle to the resulting value
    • addi

      Generate integer addition
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • addi

      StructuredSleigh.RVal addi(long rhs)
      Generate integer addition
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • addf

      Generate float addition
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • subi

      Generate integer subtraction
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • subi

      StructuredSleigh.RVal subi(long rhs)
      Generate integer subtraction of an immediate
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • subf

      Generate float subtraction
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • muli

      Generate integer multiplication
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • muli

      StructuredSleigh.RVal muli(long rhs)
      Generate integer multiplication
      Parameters:
      rhs - the immediate operand
      Returns:
      a handle to the resulting value
    • mulf

      Generate float multiplication
      Parameters:
      rhs - the second operand
      Returns:
      a handle to the resulting value
    • diviu

      Generate unsigned integer division
      Parameters:
      rhs - the divisor
      Returns:
      a handle to the resulting value
    • diviu

      StructuredSleigh.RVal diviu(long rhs)
      Generate unsigned integer division
      Parameters:
      rhs - the immediate divisor
      Returns:
      a handle to the resulting value
    • divis

      Generate signed integer division
      Parameters:
      rhs - the divisor
      Returns:
      a handle to the resulting value
    • divis

      StructuredSleigh.RVal divis(long rhs)
      Generate signed integer division
      Parameters:
      rhs - the immediate divisor
      Returns:
      a handle to the resulting value
    • divf

      Generate float division
      Parameters:
      rhs - the divisor
      Returns:
      a handle to the resulting value
    • remiu

      Generate unsigned integer division remainder
      Parameters:
      rhs - the divisor
      Returns:
      a handle to the resulting value
    • remiu

      StructuredSleigh.RVal remiu(long rhs)
      Generate unsigned integer division remainder
      Parameters:
      rhs - the immediate divisor
      Returns:
      a handle to the resulting value
    • remis

      Generate signed integer division remainder
      Parameters:
      rhs - the divisor
      Returns:
      a handle to the resulting value
    • remis

      StructuredSleigh.RVal remis(long rhs)
      Generate signed integer division remainder
      Parameters:
      rhs - the immediate divisor
      Returns:
      a handle to the resulting value