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

Re: PPC64: gcc currently compiles for power4 by default, causing glibc's sqrtf to fail on e6500



On Tue, Feb 06, 2018 at 03:40:20PM +0100, Bas Vermeulen wrote:
> I am trying to run the ppc64 unstable on a Freescale T2080, which uses the
> e6500 CPU. Running python (or any other application using sqrt or sqrtf)
> will cause an illegal instruction exception, because the sqrtf opcode is
> not supported on the e6500.
> 
> This seems to be caused by gcc compiling for power4 by default
> (_ARCH_PWR4=1 and _ARCH_PPCSQ=1 set in gcc -E -mD - < /dev/null), although
> jrtc27 on #debian-ports pointed to
> https://github.com/gcc-mirror/gcc/blob/da8dff89fa9398f04b107e388cb706517ced9505/gcc/config/rs6000/default64.h#L30
> which sets MASK_PPC_GPOPT by default (which includes fp sqrt).
> 
> What would be the best way to solve this problem?

Why is the default not powerpc64 instead of power4?  After all that is
the setting for generic 64 bit bit endian powerpc as far as I know.

It seems the e6500 is missing quite a few floating point instructions
from the Power ISA so targeting power4 (which is I believe full Power
ISA 2.01) is likely to cause issues.

-- 
Len Sorensen


Reply to: