On Aug 22, 2010, at 6:56 PM, Ali Saidi wrote:

> 
> On Aug 22, 2010, at 4:58 PM, Steve Reinhardt wrote:
>> On Sun, Aug 22, 2010 at 8:28 AM, Ali Saidi <[email protected]> wrote:
>>> 
>>> The dyninst might be able to do something like this, I'm not completely 
>>> sure. The parser still needs to add the destination registers to the source 
>>> registers or a whole mechanism would have to be cerated in the O3 to do the 
>>> wakeup logic for for the predicate false case (which seems like a whole lot 
>>> of trouble and extra code):
>>> 
>>> void forwardOldRegs()
>>> {
>>> 
>>>   for (int idx = 0; idx < numDestRegs(); idx++) {
>>>       PhysRegIndex prev_phys_reg = prevDestRegIdx(idx);
>>>       TheISA::RegIndex original_dest_reg = staticInst->destRegIdx(idx);
>>>       if (original_dest_reg <  TheISA::FP_Base_DepTag)
>>>           setIntRegOperand(staticInst, idx, 
>>> this->cpu->readIntReg(prev_phys_reg));
>>>       else if (original_dest_reg < TheISA::Ctrl_Base_DepTag)
>>>           setFloatRegOperandBits(staticInst, idx, 
>>> this->cpu->readFloatRegOperandBits(prev_phys_reg));
>>>   }
>>> }
>> 
>> Yea, this is along the lines of what I was thinking... if this really
>> is all there is to it, isn't that simpler than all the changes to the
>> isa parser?  Obviously there's a little more to it than this function,
>> but is it that bad?
> 
> I seem to have gotten it to work. There were a few bugs in the above, but 
> it's roughly right. The ISA parser still spits out code that selectively 
> makes all the destination registers sources as well, but yes it's better and 
> less intrusive. Interestingly one of the reasons it was easy was because 
> prevDestRegIdx() existed, although it was never used by anything.
I've moved this patch further down in my queue and will re-post it on 
reviewboard in the future. Anyone have any issues with the rest of them that 
i've posted going in? 

Thanks,
Ali

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

Reply via email to