Accessing dl_hwcap from libm
Steve Munroe
sjmunroe@us.ibm.com
Wed May 12 02:23:00 GMT 2004
For powerpc32 I can't assume that the fsqrt instruction is implemented.
Currently it is implemented on ALL PPC64 hardware. So I would
like to use the AT_HWCAP to detect this and conditionally use fsqrt.
Looking at i386/fpu/fesetround I see that dl_hwcap is used to check for
SSE.
if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
But when I try something similar on powerpc w_sqrt I get:
../sysdeps/powerpc/fpu/w_sqrtf.c:37: undefined reference to
`_rtld_global_ro'
It seems that fesetround (and similar functions) are included in libc,
not libm. So is it fundamental that access to dl_dwcap (_rtld_global_ro)
is restricted to libc, or can access be extended to libm?
Steven J. Munroe
Linux on Power Toolchain Architect
IBM Corporation, Linux Technology Center
More information about the Libc-hacker
mailing list