FPU: Ignore stale P contents in short-circuit multiply-add

When a multiply-add is done with A or C equal to zero, the actual
multiplication operation is not done, hence P is not valid, so in
FINISH state we shouldn't set X based on P being non-zero.  Fix this
by clearing the is_multiply flag in the short-circuit case.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
pull/457/head
Paul Mackerras 2 weeks ago
parent 41988e3b5f
commit a18c462b27

@ -3129,6 +3129,7 @@ begin
if scinfo.immed_result = '1' then
-- state machine is in the DO_SPECIAL or DO_FSQRT state here
set_r := '1';
v.is_multiply := '0'; -- P is not valid
opsel_r <= RES_MISC;
opsel_sel <= scinfo.result_sel;
if scinfo.qnan_result = '1' then

Loading…
Cancel
Save