예제 #1
0
 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();
     }
 }
예제 #2
0
 protected override void Parse(AsmParser parser)
 {
     Destination = parser.ReadReg32();
     parser.ReadToken(TokenType.Comma);
     Operand = parser.ReadIndirectOperand();
 }