public Block(BlockEncoder blockEncoder, CodeWriter codeWriter, ulong rip, List <RelocInfo>?relocInfos) { CodeWriter = new CodeWriterImpl(codeWriter); RIP = rip; this.relocInfos = relocInfos; instructions = Array2.Empty <Instr>(); dataList = new List <BlockData>(); alignment = (uint)blockEncoder.Bitness / 8; validData = new List <BlockData>(); }
public Block(BlockEncoder blockEncoder, CodeWriter codeWriter, ulong rip, IList <RelocInfo> relocInfos, uint[] newInstructionOffsets, ConstantOffsets[] constantOffsets, Instr[] instructions) { CodeWriter = new CodeWriterImpl(codeWriter); RIP = rip; this.relocInfos = relocInfos; NewInstructionOffsets = newInstructionOffsets; ConstantOffsets = constantOffsets; Instructions = instructions ?? throw new ArgumentNullException(nameof(instructions)); dataList = new List <BlockData>(); alignment = (uint)blockEncoder.Bitness / 8; validData = new List <BlockData>(); foreach (var instr in instructions) { instr.Block = this; } }