On 1/5/21 12:14 PM, Steve Kargl wrote:
> On Tue, Jan 05, 2021 at 11:26:24AM -0700, Jeff Law wrote:
>>
>> On 1/4/21 3:28 PM, Steve Kargl wrote:
>>> On Mon, Jan 04, 2021 at 02:30:43PM -0700, Jeff Law wrote:
>>>> On 1/2/21 1:34 AM, Steve Kargl via Gcc-patches wrote:
>>>>> Can someone, anyone, please commit the following trivially patch?
>>>>> gfortran.dg/dec_math.f90 will never pass on i?86-*-freebsd*.
>>>> Why will the test never pass on that platform? I don't mind installing
>>>> the patch, but I'd like to have a bit more background first :-)
>>>>
>>> The testcase assumes REAL(10) has 64-bits of precision. On
>>> i?86-*-freebsd, the i387 FPU control word is set to 53-bits.
>>> The test program is not set up to deal with 11-bits of
>>> missing precision.
>> Thanks. That's precisely what I needed to know. I suspected it was
>> related to the differing state of the fpu control word. But that begs
>> the question of whether or not the change should apply to the other BSD
>> variants.
>>
> I don't know about other BSD variants. The setting of the control
> word was done some 27 years ago on i?86-FreeBSD.
Right, and I believe the other BSD variants are derived from the Net/2
and/or 386BSD where this originated.
>
> Hmmm. A little code spelunking back to original FreeBSD 2.0.5,
>
> https://svnweb.freebsd.org/base/stable/2.0.5/sys/i386/include/npx.h?revision=4&view=markup
>
> The lines 101-132 provide the justification for the control word.
> AFIK, older FreeBSD sources are not published on FreeBSD.org due
> to USL lawsuit.
Right. I could probably find stuff older than that, but it'd require
heading up to my old office at the U and grubbing around. Unlikely
worth the effort.
>
> If this file is current
>
> http://mirror.nyi.net/NetBSD/misc/joerg/GENERIC/src/src/sys/arch/x86/include/cpu_extended_state.h.html
>
> then NetBSD is not affected unless, you are using a older version. See
> lines 196-220.
ACK. Probably the safe thing to do is keep it limited to FreeBSD.
Thanks for digging around. I'll go ahead and install it as-is.
jeff