Re: [m5-dev] SPARC O3 register indexing

2009-04-16 Thread Steve Reinhardt
OK, great... it is pretty confusing to figure out which layer of the code expects which type of register index. Getting the type system to enforce this would be nice; how does that fit in with the other reorg stuff you proposed a while ago? In the meantime, I'll just commit my patch since it

Re: [m5-dev] SPARC O3 register indexing

2009-04-16 Thread Gabe Black
It's mostly unrelated, but the two ideas would work together pretty well. Gabe Steve Reinhardt wrote: OK, great... it is pretty confusing to figure out which layer of the code expects which type of register index. Getting the type system to enforce this would be nice; how does that fit in

Re: [m5-dev] SPARC O3 register indexing

2009-04-15 Thread Steve Reinhardt
Yes, I can see now why you want to clean this up... So more concretely, it seems like I need to add TheISA::NumIntRegs in somewhere; is readArchFloatRegInt() the right place to do it? I think so, since (I believe) the input to that function is an architectural FP register index (0-31) while

Re: [m5-dev] SPARC O3 register indexing

2009-04-15 Thread Steve Reinhardt
OK, the following patch appears to work... unless I hear an objection, I'll commit it later tonight or tomorrow. Steve -- diff -r 663e33ff46c9 src/cpu/o3/cpu.cc --- a/src/cpu/o3/cpu.cc Wed Apr 15 13:56:45 2009 -0700 +++ b/src/cpu/o3/cpu.cc Wed Apr 15 15:42:57 2009 -0700 @@ -1283,7

Re: [m5-dev] SPARC O3 register indexing

2009-04-15 Thread Gabriel Michael Black
And to clarify, you'd call it before you add in NumIntRegs. Gabe Quoting Gabriel Michael Black gbl...@eecs.umich.edu: This is the right idea but isn't quite right. You need to add in a call to the flattening function on reg_idx as well, I think. I'm pretty sure it doesn't do anything for