MemoryOperand.cs 824 B

1234567891011121314151617181920212223242526272829
  1. namespace ARMeilleure.IntermediateRepresentation
  2. {
  3. class MemoryOperand : Operand
  4. {
  5. public Operand BaseAddress { get; set; }
  6. public Operand Index { get; set; }
  7. public Multiplier Scale { get; private set; }
  8. public int Displacement { get; private set; }
  9. public MemoryOperand() { }
  10. public MemoryOperand With(
  11. OperandType type,
  12. Operand baseAddress,
  13. Operand index = null,
  14. Multiplier scale = Multiplier.x1,
  15. int displacement = 0)
  16. {
  17. With(OperandKind.Memory, type);
  18. BaseAddress = baseAddress;
  19. Index = index;
  20. Scale = scale;
  21. Displacement = displacement;
  22. return this;
  23. }
  24. }
  25. }