[PATCH 5/5] x86 long double: Add tests for pseudo normal numbers

Siddhesh Poyarekar siddhesh@gotplt.org
Wed Dec 23 10:20:36 GMT 2020


On 12/23/20 7:28 AM, Siddhesh Poyarekar via Libc-alpha wrote:
> On 12/23/20 3:18 AM, Adhemerval Zanella via Libc-alpha wrote:
>>
>>
>> On 15/12/2020 11:13, Siddhesh Poyarekar via Libc-alpha wrote:
>>> Add some tests for fpclassify, isnanl, isinfl and issignaling.
>>> ---
>>>   sysdeps/x86/fpu/Makefile        |   3 +-
>>>   sysdeps/x86/fpu/test-unnormal.c | 196 ++++++++++++++++++++++++++++++++
>>>   2 files changed, 198 insertions(+), 1 deletion(-)
>>>   create mode 100644 sysdeps/x86/fpu/test-unnormal.c
>>>
>>> diff --git a/sysdeps/x86/fpu/Makefile b/sysdeps/x86/fpu/Makefile
>>> index 600e42c3db..e77de56d14 100644
>>> --- a/sysdeps/x86/fpu/Makefile
>>> +++ b/sysdeps/x86/fpu/Makefile
>>> @@ -4,11 +4,12 @@ CPPFLAGS += -I../soft-fp
>>>   libm-support += powl_helper
>>>   tests += test-fenv-sse test-fenv-clear-sse test-fenv-x87 
>>> test-fenv-sse-2 \
>>> -     test-flt-eval-method-387 test-flt-eval-method-sse
>>> +     test-flt-eval-method-387 test-flt-eval-method-sse test-unnormal
>>>   CFLAGS-test-fenv-sse.c += -msse2 -mfpmath=sse
>>>   CFLAGS-test-fenv-clear-sse.c += -msse2 -mfpmath=sse
>>>   CFLAGS-test-fenv-sse-2.c += -msse2 -mfpmath=sse
>>>   CFLAGS-test-flt-eval-method-387.c += -fexcess-precision=standard 
>>> -mfpmath=387
>>>   CFLAGS-test-flt-eval-method-sse.c += -fexcess-precision=standard 
>>> -msse2 \
>>>                        -mfpmath=sse
>>> +CFLAGS-test-unnormal.c += -fsignaling-nans -std=c2x
>>>   endif
>>
>> A possibility is to hookup this tests on
>> math/libm-test-{fpclassify,isnan,isinf,issignaling}.inc using the new 
>> define
>> I suggested on the 4/5 part [1] so you can also check if no exceptions 
>> are being
>> generated and errno is not set.
>>
>> It increases the tests coverage and avoid a arch-specific tests.
>>
>> [1] https://sourceware.org/pipermail/libc-alpha/2020-December/121004.html
> 
> OK, it will need changes to the driver.
> 

I took a look at this and it looks like it will need a significant 
amount of changes to the driver and test generation scripts, since these 
numbers are not generated by the CPU.  Would it be OK if I defer this to 
later if we ever feel the need to add tests beyond test-unnormal?

Siddhesh


More information about the Libc-alpha mailing list