FPU: Update committed FPSCR value correctly

The committed FPSCR is updated in the cycle where an FPU instruction
signals completion.  Since we update the FPRF field in the FPSCR in
that same cycle, the value put into r.comm_fpscr needs to include
the new FPRF value.  Otherwise, a subsequent flush (for example,
due to the following instruction being an illegal instruction that
has to be emulated) will drop the FPSCR update.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
pull/457/head
Paul Mackerras 3 weeks ago
parent 1ad8848655
commit 09b340e845

@ -1077,7 +1077,6 @@ begin
v.writing_fpr := '0';
v.writing_cr := '0';
v.writing_xer := '0';
v.comm_fpscr := r.fpscr;
v.illegal := '0';
end if;

@ -3728,6 +3727,10 @@ begin
v.fpscr(FPSCR_FX) := '1';
end if;

if r.complete = '1' or r.do_intr = '1' then
v.comm_fpscr := v.fpscr;
end if;

if v.instr_done = '1' then
if r.state /= IDLE then
v.state := IDLE;

Loading…
Cancel
Save