AsmResolver.Tests.Native.X86AssemblerTests.CreateOpCodeRegisterTokenTestInstructions C# (CSharp) Method

CreateOpCodeRegisterTokenTestInstructions() private static method

private static CreateOpCodeRegisterTokenTestInstructions ( ) : IEnumerable
return IEnumerable
        private static IEnumerable<X86Instruction> CreateOpCodeRegisterTokenTestInstructions()
        {
            var opcode = X86OpCodes.Arithmetic_RegOrMem8_Imm8;
            for (int index = 0; index < opcode.Mnemonics.Length; index++)
            {
                var mnemonic = opcode.Mnemonics[index];

                var instruction = new X86Instruction()
                {
                    OpCode = opcode,
                    Mnemonic = mnemonic,
                    Operand1 = new X86Operand(X86OperandUsage.BytePointer, 0x1337u),
                    Operand2 = new X86Operand((byte)index),
                };

                yield return instruction;
            }
        }