Exemple #1
0
        protected override IEnumerable <RtlInstructionCluster> GetRtlStream(MemoryArea mem, IStorageBinder binder, IRewriterHost host)
        {
            var state = arch.CreateProcessorState();
            var rdr   = arch.CreateImageReader(mem, 0);

            return(arch.CreateRewriter(rdr, state, binder, host));
        }
        // This spams the CI builds [Test]
        public void XCore200Rw_foo()
        {
            var mem = new ByteMemoryArea(Address.Ptr32(0x00100000), new byte[65536]);
            var rnd = new Random(4711);

            rnd.NextBytes(mem.Bytes);
            var rdr    = arch.CreateImageReader(mem, 0);
            var state  = arch.CreateProcessorState();
            var binder = arch.CreateFrame();
            var host   = new Mock <IRewriterHost>();
            var rw     = arch.CreateRewriter(rdr, state, binder, host.Object);
            var instrs = rw.ToArray();
        }