private void Given_Instrs(RtlBlock block, Action <RtlEmitter> b) { var instrs = new List <RtlInstruction>(); var trace = new RtlEmitter(instrs); b(trace); block.Instructions.Add( new RtlInstructionCluster( block.Address + block.Instructions.Count * 4, 4, instrs.ToArray())); }
private void Given_Instrs(RtlBlock block, Action <RtlEmitter> b) { var instrs = new List <RtlInstruction>(); var trace = new RtlEmitter(instrs); b(trace); var rtlc = InstrClass.Linear; if (instrs.Count == 1) { rtlc = instrs.First().Class; } block.Instructions.Add( new RtlInstructionCluster( block.Address + (block.Instructions.Count * 4), 4, instrs.ToArray()) { Class = rtlc, }); }
private RtlBlock Given_Block(ushort uSeg, ushort uOffset) { var b = new RtlBlock(Address.SegPtr(uSeg, uOffset), $"l{uSeg:X4}_{uOffset:X4}"); return(b); }
private RtlBlock Given_Block(uint uAddr) { var b = new RtlBlock(Address.Ptr32(uAddr), $"l{uAddr:X8}"); return(b); }
private Expression Target(RtlBlock block) { return(((RtlGoto)block.Instructions.Last().Instructions.Last()).Target); }