On Wed, Jun 22, 2011 at 2:24 PM, nathan binkert <[email protected]> wrote:
> > My guess (and assumption) is that the *res update in AtomicSimpleCPU is > just > > due to a different code factorization, or could be moved into > writeBytes(), > > to make all the templates identical. Then they could be factored out of > the > > CPU models. If I'm wrong, then you're right, but I'm not convinced I'm > > wrong... > > I'm not objecting to this. I this really what this patch is all about > though? > Eliminating redundant code is not the point of this patch, just a happy side effect. The real goal is to avoid either: 1. having to add a new template instantiation to each CPU model every time an ISA wants to use a different type for memory values or 2. having some weird restrictions about which types can be used to access memory and which types can't, and requiring ISA descriptions to have explicit casts from the latter to the former I think you're saying that we could achieve #1 by putting the template definitions in a header and letting them get instantiated automatically. Not sure why we're not doing that to begin with... historical, I guess. That's a fine solution also if it really works. That said, there is a lot of redundancy that would be nice to factor out, and this would also make the ExecContext interface narrower, which is a good thing. Steve _______________________________________________ gem5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/gem5-dev
