On Thu, Feb 18, 2010 at 10:52, Stefan Haustein <[email protected]> wrote: > Ivan, > having a common simulator base class and subclasses for ARM and Thumb2 > turned out to be more tricky than expected. I have started creating a common > base class for the thumb2 and arm simulator (in a separate svn client), but > I would also need to add common base classes for the debugger and > disassembler. Moreover, I no longer think this can be done in a reasonable > way without adding virtual methods, due to the way how the classes > interact. > Maybe a better way to avoid the code duplication in the simulator would be > to add thumb2 support to the existing simulator / debugger / disassembler? > Alternatively, we could keep the duplication for now, and remove ARM support > from the Thumb2 simulator later, when we have implemented full Thumb2 > support in the assembler. I think I would prefer an integrated simulator.
I agree that this is probably the best approach. I believe that you will have to support a ARM/Thumb2 mixed system for a long time for different reasons. In essence this approach mirrors exactly what the actual CPU does: running ARM and Thumb2 instructions in one unit. -Ivan > Stefan > On Tue, Feb 16, 2010 at 12:21 PM, Stefan Haustein <[email protected]> > wrote: >> >> On Tue, Feb 16, 2010 at 6:51 AM, <[email protected]> wrote: >>> >>> I guess I do not understand the motivation to add a complete duplicate >>> copy of >>> the simulator to the system. Can you please elaborate your plans in that >>> respect? >> >> The plan was to keep the new stuff completely separate for now, given that >> we may want to replace ARM code generation with Thumb2 code generation at >> some point. Keeping the simulators separate would also minimize interference >> with the existing ARM code while working on Thumb2. >> However, I am happy to extract the common simulator code to a shared base >> class, or to just add Thumb2 support to the existing ARM simulator. I think >> I would prefer a common base class for now. A common base class would reduce >> the duplicated code significantly while keeping interference between T2 and >> ARM development minimal. And we would not need virtual methods, so it should >> not have any performance impact. >> Stefan >>> >>> Thanks, >>> -Ivan >>> >>> >>> http://codereview.chromium.org/601028 >> >> >> >> -- >> Stefan Haustein >> Google UK Limited >> >> Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W >> 9TQ; Registered in England Number: 3977902 >> > > > > -- > Stefan Haustein > Google UK Limited > > Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W > 9TQ; Registered in England Number: 3977902 > > -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
