[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: floating point types seems to need VSX support ?



Hi Dennis!

On 10/21/2017 04:55 AM, Dennis Clarke wrote:
> WARNING : long and winding but full of examples.

Thanks for digging this out.

> This is quite confusing with gcc 7.2.0 on latest ppc64 sid.

Did you try an earlier gcc version from snapshots.debian.org?

> There is not vector scalar support until Power7 at least. This is an old
> PowerMac G5 with 970 processors.
> 
> It seems very confusing as to how the value in memory can be perfect and
> yet printf can not output a correct value and I suspect simple math
> functions also go out the window :

Sounds like a regression to me.

> So this seems messy and may be related to the need for a Power7 system
> as a minimum.  I see this :
> 
>     "Enable -mfloat128 by default on PowerPC VSX systems"
>     https://patchwork.ozlabs.org/patch/802272/
> 
> Here I wonder if GCC on PowerPC 64-bit systems requires the Power7 VSX
> support as a minimum or all computations go out the window. Does someone
> have one handy and can show what they see in memory as well as the
> output from sinl and printf?

I wouldn't be surprised if this commit broke printf on your system.

IBM's POWER people are unfortunately quite ignorant when it comes to
older POWER systems. Some of them behave as if IBM owns POWER on Linux
and they are forcefully trying to deprecate the older POWER systems on
Linux with changes like these.

I don't want to say it was done on purpose in this case, but I wouldn't
be surprised either from the various comments I have heard from IBM
folk. Be it in Golang, in the kernel or other projects. It's frustrating
because there are still POWER systems outside IBM based on Freescale
designs for example and such changes by IBM developers are breaking
stuff for those people.

> So regardless if I use gcc 6.4.0 or gcc 7.2.0 or even the Oracle cc we
> always see the correct data in memory and the correct output.

Oracle's people are actually doing a fantastic job in every regard and
they are very careful not to break old configurations. gcc, for example,
still defaults to SPARCv7 on 32-bit. If only the management at Oracle
was as brilliant as their engineers.

> However on PowerPC 64-bit with gcc 7.2.0 there seems to be an entirely other
> data representation at work internally and a need for -mfloat128 ? That
> won't work unless the hardware has VSX support.  Then again I don't know
> but I do know that the output is wrong if the in memory data is correct.

It definitely looks like a regression to me and I wouldn't be surprised
if it broke since the author of the patch you linked apparently didn't
test this on anything older but POWER7.

> Am I missing something here to make the exact same functionality on
> ppc64 ?  Personally I am confused about what floating point support
> there is in the hardware and gcc combination.  Any input from anyone
> would be great and would really love to see what a Power7 system does.

I could test this on a POWER7 system which I have available for such
things. Just let me know what you want me to test in particular.

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Reply to: