|
From: | Michael Morrell |
Subject: | Denormal input handling |
Date: | Wed, 26 May 2021 17:37:33 +0000 |
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 sf_canonicalize, if the input is denormal and "flush_inputs_to_zero" is true, the "input denormal" flag is set and then the value is set to a zero value, and if the input is denormal and "flush_inputs_to_zero" is false,
then the input is simply normalized. I think the behavior should be for denormal inputs that if "flush_inputs_to_zero" is true, then the value is set to zero; 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). Am I missing something? If not, I can work on a patch (there are several places which check "flush_inputs_to_zero" which will need to be changed). Michael |
[Prev in Thread] | Current Thread | [Next in Thread] |