RE: Denormal input handling

2021-06-22 Thread Michael Morrell
to claim there are additional issues here. Michael -Original Message- From: Richard Henderson Sent: Monday, June 21, 2021 4:30 PM To: Michael Morrell ; qemu-devel@nongnu.org Subject: Re: Denormal input handling On 6/21/21 4:13 PM, Michael Morrell wrote: > I have another couple of thoughts around i

RE: Denormal input handling

2021-06-21 Thread Michael Morrell
. Michael -Original Message- From: Richard Henderson Sent: Monday, June 21, 2021 4:30 PM To: Michael Morrell ; qemu-devel@nongnu.org Subject: Re: Denormal input handling On 6/21/21 4:13 PM, Michael Morrell wrote: > I have another couple of thoughts around input denormal handl

RE: Denormal input handling

2021-06-21 Thread Michael Morrell
4:30 PM To: Michael Morrell ; qemu-devel@nongnu.org Subject: Re: Denormal input handling On 6/21/21 4:13 PM, Michael Morrell wrote: > I have another couple of thoughts around input denormal handling. > > The first is straightforward.  I noticed that the Aarch64 port doesn't > report input

Re: Denormal input handling

2021-06-21 Thread Richard Henderson
On 6/21/21 4:13 PM, Michael Morrell wrote: I have another couple of thoughts around input denormal handling. The first is straightforward.  I noticed that the Aarch64 port doesn't report input denormals (I could not find any code which sets the IDC bit in the FPSR).  I found code in the arm

RE: Denormal input handling

2021-06-21 Thread Michael Morrell
I have another couple of thoughts around input denormal handling. The first is straightforward. I noticed that the Aarch64 port doesn't report input denormals (I could not find any code which sets the IDC bit in the FPSR). I found code in the arm (not aarch64) port that sets other bits like

Re: Denormal input handling

2021-05-26 Thread Richard Henderson
On 5/26/21 2:59 PM, Michael Morrell wrote: First, I apologize for the duplicate thread. I thought the first attempt didn't go through. I agree with Richard that we need an extra flag bit. The current behavior is not right for SSE on x86 (it looks like x87 might be different still). For

RE: Denormal input handling

2021-05-26 Thread Michael Morrell
, are you willing to make the change or do you want me to try? Thanks, Michael -Original Message- From: Peter Maydell Sent: Wednesday, May 26, 2021 1:19 PM To: Michael Morrell Cc: qemu-devel@nongnu.org; Richard Henderson Subject: Re: Denormal input handling On Wed, 26 May 2021 at 20

Re: Denormal input handling

2021-05-26 Thread Richard Henderson
So, DE should not be set for a denormal input if DAZ is set (it is set only when DAZ is 0 -- the default "IEEE mode"). It's not my day is it? Clearly the bit that I quoted is wrt to the output denormal flushing. But my suggested fix is still not wrong -- have two bits that cover both

Re: Denormal input handling

2021-05-26 Thread Peter Maydell
On Wed, 26 May 2021 at 20:07, Michael Morrell wrote: > I see support in QEMU for architectures which have a denormal > input flag bit and those that have a "flush inputs to zero" control > bit, but the implementation is not specializable and seems wrong > for x86 at least. > For example, in

Re: Denormal input handling

2021-05-26 Thread Michael Morrell via
Richard, How is what I suggested wrong for x86? It matches the spec and actual behavior: == Start quote == 10.2.3.4 Denormals-Are-Zeros Bit 6 (DAZ) of the MXCSR register enables the denormals-are-zeros mode, which controls the processor’s response to a SIMD floating-point denormal operand

Re: Denormal input handling

2021-05-26 Thread Richard Henderson
On 5/26/21 12:23 PM, Richard Henderson wrote: On 5/26/21 12:02 PM, Michael Morrell via wrote: I think the behavior should be for denormal inputs that if "flush_inputs_to_zero" is true, then set the value to zero (without setting the "input denormal" flag); and if "flush_inputs_to_zero" is

Re: Denormal input handling

2021-05-26 Thread Richard Henderson
On 5/26/21 12:02 PM, Michael Morrell via wrote: I think the behavior should be for denormal inputs that if "flush_inputs_to_zero" is true, then set the value to zero (without setting the "input denormal" flag); and if "flush_inputs_to_zero" is false, set the "input denormal" flag and normalize