/// <summary>
        ///     Create an ARm64 Instruction Detail From a Native ARM64 Instruction Detail.
        /// </summary>
        /// <param name="this">
        ///     A native ARM64 instruction detail.
        /// </param>
        /// <param name="instruction">
        ///     The instruction the detail belongs to.
        /// </param>
        /// <returns>
        ///     An ARM64 instruction detail.
        /// </returns>
        public static Arm64InstructionDetail AsArm64InstructionDetail(this NativeArm64InstructionDetail @this, Arm64Instruction instruction)
        {
            var @object = new Arm64InstructionDetail();

            @object.CodeCondition = @this.ManagedCodeCondition;
            @object.Operands      = @this.ManagedOperands.Select(m => m.AsArm64InstructionOperand(instruction)).ToArray();

            return(@object);
        }
Beispiel #2
0
        /// <summary>
        ///     Create ARM64 Operands.
        /// </summary>
        /// <param name="disassembler">
        ///     A disassembler.
        /// </param>
        /// <param name="instructionId">
        ///     An instruction's unique identifier.
        /// </param>
        /// <param name="nativeInstructionDetail">
        ///     A native ARM64 instruction detail.
        /// </param>
        /// <returns>
        ///     An array of ARM64 operands.
        /// </returns>
        internal static Arm64Operand[] Create(CapstoneDisassembler disassembler, Arm64InstructionId instructionId, ref NativeArm64InstructionDetail nativeInstructionDetail)
        {
            var operands = new Arm64Operand[nativeInstructionDetail.OperandCount];

            for (var i = 0; i < operands.Length; i++)
            {
                ref var nativeOperand = ref nativeInstructionDetail.Operands[i];
                operands[i] = new Arm64Operand(disassembler, instructionId, ref nativeOperand);
            }