On Tue, Sep 23, 2008 at 9:37 PM, Ali Saidi <[EMAIL PROTECTED]> wrote:

>
> On Sep 23, 2008, at 9:28 PM, Steve Reinhardt wrote:
> > I believe it's impossible fault on a microop in the middle of a
> > macroop and then resume where you left off in the middle of the
> > macroop flow.  If you fault you will roll back to the state at the
> > beginning of the macroop and then on resuming from the fault you
> > either have to reexecute the macroop from the start or skip it
> > entirely.
> >
> > So it seems like the two cases where you're in the middle of a
> > macroop flow and you end the macroop are either (1) the final,
> > specially marked microop of the normal flow hits retire or (2) a
> > microop causes a fault and the whole macroop is discarded and the
> > fault handler is invoked.  Interrupts don't count because you'd
> > never take an interrupt in the middle of a macroop.
> I think x86s string copy instruction is a case where you have to be
> able to take an fault (tlb) in the middle of the micro-op and then
> resume. Otherwise it would be possible to prevent the machine from
> making forward progress with a string copy that spanned more pages
> than the tlb holds.


Yea, I was thinking of REP instructions as I wrote that... I believe the
reality is that a REP instruction is actually executed almost as if it were
N distinct instructions; basically you just re-execute the same PC
decrementing CX/ECX/RCX each time but only advance the PC when the count
hits 0.  You can take a page fault on any "instance" and restart from that
instance, or take an interrupt between instances.  Since all of the state is
kept in the GPRs it's totally restartable with no special handling.

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

Reply via email to