This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Accessing dl_hwcap from libm


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]