On Thu, Jul 14, 2011 at 1:39 PM, Peter Maydell <peter.mayd...@linaro.org> wrote: > On 14 July 2011 10:41, Tsuneo Saito <tsnsa...@gmail.com> 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.
I applied a patch to fix this and similar bug with AM bit.