qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 4/8] SPARC64: fp_disabled checks on stfa/stdf


From: Blue Swirl
Subject: Re: [Qemu-devel] [PATCH v2 4/8] SPARC64: fp_disabled checks on stfa/stdfa/stqfa
Date: Thu, 14 Jul 2011 18:33:40 +0300

On Thu, Jul 14, 2011 at 1:39 PM, Peter Maydell <address@hidden> wrote:
> On 14 July 2011 10:41, Tsuneo Saito <address@hidden> wrote:
>> stfa/stdfa/stqfa instructions should raise fp_disabled exceptions
>> if %pstate.PEF==0 or %fprs.FEF==0.
>
> Not really related to this patch but I happened to notice it:
> we generate a trap if dc->fpu_enabled is clear. That flag is set with:
>        dc->fpu_enabled = cpu_fpu_enabled(env);
> which looks at the CPUState passed into gen_intermediate_code_internal.
>
> I think it should be pulling the fpu-enabled state out of the
> tb->flags instead. Otherwise you'll have problems if you have
> a TB with (1) a trap-if-no-fpu insn (2) a change of the fpu-enabled
> state (3) a load/store that faults.

Nice catch, this also affects Sparc32.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]