private static ushort GetOpcodeTemplate(IndirectOperand operand) { switch (operand.Register) { case IndirectRegister.X: return _xTemplate; case IndirectRegister.Y: if (operand.Increment || operand.Decrement) return _yPostPreTemplate; return _yTemplate; case IndirectRegister.Z: if (operand.Increment || operand.Decrement) return _zPostPreTemplate; return _zTemplate; default: throw new InvalidOperationException(); } }
protected override void Parse(AsmParser parser) { Destination = parser.ReadReg32(); parser.ReadToken(TokenType.Comma); Operand = parser.ReadIndirectOperand(); }