示例#1
0
 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>();
 }
示例#2
0
文件: Block.cs 项目: yang123vc/iced
 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;
     }
 }