On Tue, Jun 30, 2009 at 09:17:37AM -0700, Steve Reinhardt wrote:
> Does this make sense?  Does anyone want to volunteer to take a crack at
> this?  How well do you know Python, Jack? ;-)

This is something I could do. 

At the moment, my priority is to get O3 working for ARM. (This is for
some research; I really want an O3 CPU that runs fully predicated code.) 
But I am keen to do this the "right" way so my modifications can be 
part of M5. 

> I agree... I think the "smarter single class" approach is better too.  What
> would be really nice is if we could avoid modifying src/cpu/static_inst.hh
> as well, and instead find a way to have the constructor for each
> StaticInst-derived class set the flags fields (IsControl, IsCondControl, and
> any others) based on whether r15 is a dest for this particular instance and
> whether the condition is "always" or not.  This would require some hacking
> on isa_parser.py since right now all you can do is pass in the name of a
> flag to get set to 'true'.  Maybe we could extend the flag processing so
> that you can pass in a tuple where the first element is the string name of a
> flag and the second element is the name of a function that returns a bool
> that gets called to initialize the flag, then set this up to be a
> non-virtual member function that can look at the dest regs and see if any of
> them are r15, etc.
> 
> This would work as it stands since it just so happens that the register
> arrays get set up in the constructor before the flags get initialized, but
> it would be good to put a comment in InstObjParams.__init__ if that becomes
> a functional requirement.

Ok, this sounds like a reasonable way to do it. That could inspect both
rD and the condition field and change behaviour appropriately. I'll get
back to you if I have questions about this (or hit a problem).


-- 
Jack Whitham
[email protected]

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

Reply via email to