From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13316 invoked by alias); 14 Mar 2002 17:38:01 -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 13243 invoked from network); 14 Mar 2002 17:37:58 -0000 Received: from unknown (HELO sunsite.mff.cuni.cz) (195.113.19.66) by sources.redhat.com with SMTP; 14 Mar 2002 17:37:58 -0000 Received: (from jakub@localhost) by sunsite.mff.cuni.cz (8.11.6/8.11.6) id g2EHbtb31354; Thu, 14 Mar 2002 18:37:55 +0100 Date: Thu, 14 Mar 2002 09:38:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: libc-hacker@sources.redhat.com Subject: [PATCH] Fix __clz_tab Message-ID: <20020314183755.C2204@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek References: <3C8F6C22.6B38A19E@iol.unh.edu> <20020313173619.A2204@sunsite.ms.mff.cuni.cz> <1016061212.6837.1083.camel@myware.mynet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <1016061212.6837.1083.camel@myware.mynet>; from drepper@redhat.com on Wed, Mar 13, 2002 at 03:13:32PM -0800 X-SW-Source: 2002-03/txt/msg00050.txt.bz2 On Wed, Mar 13, 2002 at 03:13:32PM -0800, Ulrich Drepper wrote: > > it is > > just not needed anywhere on certain arches. I'd think the best thing to do > > would be to put them back, make __clz_tab hidden (but am not sure if > > it should be in stdlib/longlong.h header (as e.g. gcc is not interested in > > such changes), > > The file is not going back for all archs. Any change will have to > happen in an architecture-dependent Makefile. How the attribute is > added is another problem. Something like this (I haven't bothered with attribute_hidden for it yet)? I think the default should be to compile __clz_tab in, since from currently supported glibc major architectures it is needed for 10 and not needed for 3. 2002-03-14 Jakub Jelinek * sysdeps/generic/mp_clz_tab.c: New. * sysdeps/i386/mp_clz_tab.c: New. * sysdeps/hppa/mp_clz_tab.c: New. * sysdeps/powerpc/mp_clz_tab.c: New. * stdlib/Makefile (aux): Revert last patch. * math/Makefile (gmp-objs): Likewise. --- libc/math/Makefile.jj Wed Mar 13 07:53:21 2002 +++ libc/math/Makefile Thu Mar 14 08:00:28 2002 @@ -183,7 +183,7 @@ o = .os endif gmp-objs = $(patsubst %,$(common-objpfx)stdlib/%$o,\ add_n sub_n cmp addmul_1 mul_1 mul_n divmod_1 \ - lshift rshift udiv_qrnnd inlines) + lshift rshift mp_clz_tab udiv_qrnnd inlines) $(objpfx)atest-exp: $(gmp-objs) $(objpfx)atest-sincos: $(gmp-objs) $(objpfx)atest-exp2: $(gmp-objs) --- libc/stdlib/Makefile.jj Thu Mar 14 06:20:28 2002 +++ libc/stdlib/Makefile Thu Mar 14 08:01:28 2002 @@ -70,9 +70,7 @@ mpn-headers = longlong.h gmp.h gmp-impl. routines := $(strip $(routines) $(mpn-routines)) \ dbl2mpn ldbl2mpn \ mpn2flt mpn2dbl mpn2ldbl -# mp_clz seems not to be used. At least on x86. If removing the file -# does not cause problem clean this up and actually remove the file. -aux := fpioconst# mp_clz_tab +aux := fpioconst mp_clz_tab distribute := $(distribute) $(mpn-headers) gen-mpn-copy fpioconst.h generated += isomac isomac.out --- libc/sysdeps/generic/mp_clz_tab.c.jj Thu Mar 14 08:04:35 2002 +++ libc/sysdeps/generic/mp_clz_tab.c Mon Jul 9 14:57:52 2001 @@ -0,0 +1,37 @@ +/* __clz_tab -- support for longlong.h + Copyright (C) 1991, 1993, 1994, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. Its master source is NOT part of + the C library, however. The master source lives in the GNU MP Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#if 0 +#include "gmp.h" +#include "gmp-impl.h" +#endif + +const +unsigned char __clz_tab[] = +{ + 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, + 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, +}; --- libc/sysdeps/hppa/mp_clz_tab.c.jj Thu Mar 14 08:06:11 2002 +++ libc/sysdeps/hppa/mp_clz_tab.c Thu Mar 14 08:06:11 2002 @@ -0,0 +1 @@ +/* __clz_tab not needed on hppa. */ --- libc/sysdeps/i386/mp_clz_tab.c.jj Thu Mar 14 08:05:58 2002 +++ libc/sysdeps/i386/mp_clz_tab.c Thu Mar 14 08:05:58 2002 @@ -0,0 +1 @@ +/* __clz_tab not needed on i386. */ --- libc/sysdeps/powerpc/mp_clz_tab.c.jj Thu Mar 14 08:06:29 2002 +++ libc/sysdeps/powerpc/mp_clz_tab.c Thu Mar 14 08:06:29 2002 @@ -0,0 +1 @@ +/* __clz_tab not needed on powerpc. */ Jakub