From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14060 invoked by alias); 12 May 2004 02:23:24 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 14042 invoked from network); 12 May 2004 02:23:23 -0000 Received: from unknown (HELO e2.ny.us.ibm.com) (32.97.182.102) by sourceware.org with SMTP; 12 May 2004 02:23:23 -0000 Received: from northrelay04.pok.ibm.com (northrelay04.pok.ibm.com [9.56.224.206]) by e2.ny.us.ibm.com (8.12.10/8.12.2) with ESMTP id i4C2NN5I436900 for ; Tue, 11 May 2004 22:23:23 -0400 Received: from d27mc103.rchland.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by northrelay04.pok.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i4C2NteG075724 for ; Tue, 11 May 2004 22:23:56 -0400 Subject: Accessing dl_hwcap from libm To: libc-hacker@sources.redhat.com Cc: Mark Brown Message-ID: From: Steve Munroe Date: Wed, 12 May 2004 02:23:00 -0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-SW-Source: 2004-05/txt/msg00021.txt.bz2 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