Re: final i386.floating.record.patch

Michael Snyder
2009-08-05T01:34:02Z

paawan oza wrote:
> Hi Hui,
>
> please find my analysis as follows.
>
> following are the registers which you may find it different.
>
> fstat
> ftag
> fiseg
> fioff
> foseg
> fooff
> fop
>
> In my opinion, we do not need to record all these registers. because these registers are purly depends on instruction's execution status in FPU unit.
>
>
> for e.g.
> fop register stores te last opcode executed by x87 FPU unit.
> fstat register may contain c0, c1, c2, c3 flag status...
>
> why we dont need to record, because even if we reply the recod...
> Anyway these register are going to be change by FPU HW unit based on any fp insn's nature and its execution. (next insn which FPU is going to execute)
>
> so it doesnt make much sense to store it, because even if we restore it, FPU unit doesnt use them directly, but FPU HW sets them after executing current fp insn. so anyway they are going to reset as soon as FPU executes next insn.
>
> but still if you feel that we must record those registers because user might want to observe those registers, then I can do that.
>
> please let me know you opinion about it.

It may be that saving the registers is not purely necessary, but
we are not just a simulator -- we are a debugger. The user might
be confused if he steps backward and sees that the register did not
change.

So I think we should preserve it and revert it.