Hi Steve, Thanks for the comments.
On Tue, 01 Dec 2009 20:12:19 -0000, Steve Reinhardt <[email protected]> wrote: > I'd say the main thing that could be cleaned up here is that you want > to extend the "ExecContext" interface (see > http://m5sim.org/wiki/index.php/ExecContext) with the > finishTranslation() function, and then find the right instance using > templates; this lets you not only avoid the virtual function call as > Gabe said, but more importantly will let you get rid of the separate > DataTranslationCpu and DataTranslationInst classes. Roughly speaking, > you want something like: > > template <class ExecContext> > class DataTranslation : public BaseTLB::Translation > { > ExecContext *xc; > > void finish(...) { > xc->finishTranslation(...); > } > } > > then instantiate DataTranslation<TimingSimpleCPU> and DataTranslation< > BaseDynInst<Impl> > (or something like that; maybe that last template > param needs to be O3-specific). Then you only need to define > finishTranslation as a non-virtual function on those template argument > classes. Does that make sense? > That does make sense. I'll have a go at implementing that later this week. Tim -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
