|
From: | Richard Henderson |
Subject: | Re: Denormal input handling |
Date: | Wed, 26 May 2021 12:28:34 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
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 false, set the "input denormal" flag and normalize the input.This matches what x86 does (I'm not sure about other architectures).It is not. Intel Architectures SDM Vol 1, Section 11.5.2.2: The denormal operand exception is not affected by flush-to-zero mode.
Ho hum, I misread what you wrote outside the quoted context.Both your suggestion and the current behaviour are wrong for x86. The current behavior is correct for arm.
What we need are two separate softfloat flags, one for "any denormal seen on input" and another for "denormal flushed to zero on input".
The target emulation code then chooses what set of bits needs exporting to target architecture state.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |