Hi folks. I was digging around in gem5 today, and thinking about the ISA
dependencies of the ThreadContext class. Some of those stem from the fact
that many of the functions in that class are for accessing registers, and
each ISA has different types defined for integer, floating point, and
"misc" (control) registers.

It seems to me that at least for the functions that access those registers,
we could standardize on a generic type for all the ISAs. That would be
similar to how the Addr type is the same for all ISAs, specifically a
uint64_t. That type is sufficient for all the ISAs we support, although it
may not always be necessary.

Similarly, I think we could make the universal type for integer and control
registers, a uint64_t, and floating point registers doubles. The actual
type consumed by instructions could be down converted to something smaller
if necessary with no loss of information.

Thoughts?

Gabe
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to