private R1R2Operand(UInt16 opcode, RegisterOperand r1, RegisterOperand r2) : base(opcode) { m_r1 = r1; m_r2 = r2; }
internal static R1R2Operand MakeForUnitTest(RegisterOperand r1, RegisterOperand r2) { return(MakeForUnitTest(OpcodeDef.Dummy, r1, r2)); }
private RAdrXOperand(UInt16 opcode, RegisterOperand r, AdrXOperand adrX) : base(opcode) { m_r = r; m_adrX = adrX; }
internal static R1R2Operand MakeForUnitTest(UInt16 opcode, RegisterOperand r1, RegisterOperand r2) { return(new R1R2Operand(opcode, r1, r2)); }
internal static RAdrXOperand MakeForUnitTest(RegisterOperand r, AdrXOperand adrX) { return(MakeForUnitTest(OpcodeDef.Dummy, r, adrX)); }
internal static RAdrXOperand MakeForUnitTest(UInt16 opcode, RegisterOperand r, AdrXOperand adrX) { return(new RAdrXOperand(opcode, r, adrX)); }
internal static AdrXOperand MakeForUnitTest(UInt16 opcode, IAdrCodeGenerator adr, RegisterOperand x) { return(new AdrXOperand(opcode, adr, x)); }
internal static AdrXOperand MakeForUnitTest(IAdrCodeGenerator adr, RegisterOperand x) { return(MakeForUnitTest(OpcodeDef.Dummy, adr, x)); }
private AdrXOperand(UInt16 opcode, IAdrCodeGenerator adr, RegisterOperand x) : base(opcode) { m_adr = adr; m_x = x; }
private static Boolean CanIndex(RegisterOperand x) { return(MinIndexReg <= x.Number && x.Number <= MaxIndexReg); }
/// <summary> /// オペランドが r の機械語命令を作成します。 /// </summary> /// <param name="mnemonic">命令のニーモニックを表わす文字列です。</param> /// <param name="opcode">この命令のオペコードの値です。</param> /// <returns></returns> internal static MachineInstruction MakeR(String mnemonic, UInt16 opcode) { return(new MachineInstruction( mnemonic, Resources.SYN_R, (lexer) => RegisterOperand.Parse(lexer, opcode))); }