qemu-ppc
[Top][All Lists]
Advanced

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

Re: [RFC PATCH 1/2] target/ppc: Add invalid imz, isi and snan to do_floa


From: Richard Henderson
Subject: Re: [RFC PATCH 1/2] target/ppc: Add invalid imz, isi and snan to do_float_check_status()
Date: Thu, 12 May 2022 16:01:26 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

On 5/12/22 12:42, Víctor Colombo wrote:
Make do_float_check_status also handle some invalid exceptions:
imz, isi and snan.

The idea is to try to concentrate the handling of all fp exceptions in
do_float_check_status. For this RFC, move only the 3 exceptions stated
above.

I chose to create new '*_defer' helpers to propose a gradual transition
for the instructions helpers. The 'defer' comes from the idea that the
exception raising is defered to be called somewhere else, as oposed of
what is being done in the original, 'non-defered' functions, which
immediatly call raise_exception_err_ra().

This is not correct.

You need to go through section 4.4 "Floating-point excepions" and note what happens when each exception is enabled (e.g. VE=1):

(1) Do not modify the FPR,
(2) Do or do not modify FR, FI, FPRF.

The mechanism by which we avoid setting the FPR is to to raise an exception before returning from the helper performing the operation.

I believe it's mostly invalid and divbyzero that avoid setting results, while overflow, underflow, inexact do.


r~



reply via email to

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