public OperandRewriter(M68kArchitecture arch, RtlEmitter emitter, Frame frame, PrimitiveType dataWidth) { this.arch = arch; this.m = emitter; this.frame = frame; this.DataWidth = dataWidth; }
public void Setup() { this.mr = new MockRepository(); this.fsSvc = mr.StrictMock<IFileSystemService>(); this.tllSvc = mr.Stub<ITypeLibraryLoaderService>(); this.services = mr.StrictMock<IServiceProvider>(); var cfgSvc = mr.Stub<IConfigurationService>(); var env = mr.Stub<OperatingEnvironment>(); this.arch = new M68kArchitecture(); this.rtls = new List<RtlInstruction>(); this.m = new RtlEmitter(rtls); cfgSvc.Stub(c => c.GetEnvironment("amigaOS")).Return(env); env.Stub(e => e.TypeLibraries).Return(new List<ITypeLibraryElement>()); env.Stub(e => e.CharacteristicsLibraries).Return(new List<ITypeLibraryElement>()); env.Stub(e => e.Options).Return(new Dictionary<string, object> { { "versionDependentLibraries", new Dictionary<string,object> { { "33", new List<object> { "exec_v33", "dos_v33" } }, { "34", new List<object> { "exec_v34", "dos_v34" } }, } } }); this.services.Stub(s => s.GetService(typeof(IConfigurationService))).Return(cfgSvc); this.services.Stub(s => s.GetService(typeof(IFileSystemService))).Return(fsSvc); this.services.Stub(s => s.GetService(typeof(ITypeLibraryLoaderService))).Return(tllSvc); this.frame = new Frame(arch.FramePointerType); }
public void Setup() { this.mr = new MockRepository(); this.fsSvc = mr.StrictMock<IFileSystemService>(); this.services = mr.StrictMock<IServiceProvider>(); this.arch = new M68kArchitecture(); this.rtls = new List<RtlInstruction>(); this.m = new RtlEmitter(rtls); this.services.Stub(s => s.GetService(typeof(IFileSystemService))).Return(fsSvc); this.frame = new Frame(arch.FramePointerType); }
public void Setup() { this.mr = new MockRepository(); this.fsSvc = mr.StrictMock<IFileSystemService>(); this.tllSvc = mr.Stub<ITypeLibraryLoaderService>(); this.services = mr.StrictMock<IServiceProvider>(); var cfgSvc = mr.Stub<IConfigurationService>(); var env = mr.Stub<OperatingEnvironment>(); this.arch = new M68kArchitecture(); this.rtls = new List<RtlInstruction>(); this.m = new RtlEmitter(rtls); cfgSvc.Stub(c => c.GetEnvironment("amigaOS")).Return(env); env.Stub(e => e.TypeLibraries).Return(new TypeLibraryElementCollection()); env.CharacteristicsLibraries = new TypeLibraryElementCollection(); this.services.Stub(s => s.GetService(typeof(IConfigurationService))).Return(cfgSvc); this.services.Stub(s => s.GetService(typeof(IFileSystemService))).Return(fsSvc); this.services.Stub(s => s.GetService(typeof(ITypeLibraryLoaderService))).Return(tllSvc); this.frame = new Frame(arch.FramePointerType); }