From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7516 invoked by alias); 9 Nov 2006 23:29:56 -0000 Received: (qmail 7500 invoked by uid 22791); 9 Nov 2006 23:29:56 -0000 X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 09 Nov 2006 23:29:52 +0000 Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id kA9NTlJp011016; Fri, 10 Nov 2006 00:29:47 +0100 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.13.1/8.13.1/Submit) id kA9NTlZc011014; Fri, 10 Nov 2006 00:29:47 +0100 Date: Thu, 09 Nov 2006 23:29:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix i386 sysconf at -O3 Message-ID: <20061109232947.GM5868@sunsite.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00008.txt.bz2 Hi! At least with GCC 4.1.x and -O3 the register pressure on i?86 is too high with all the inline asm for cpuid. The following patch cures it and is IMHO desirable anyway, intel_check_word is quite big and it is wasteful to replicate it 3 times. 2006-11-10 Jakub Jelinek * sysdeps/unix/sysv/linux/i386/sysconf.c (intel_check_word): Add noinline attribute. --- libc/sysdeps/unix/sysv/linux/i386/sysconf.c 2006-11-09 23:07:15.000000000 +0100 +++ libc/sysdeps/unix/sysv/linux/i386/sysconf.c 2006-11-09 23:07:15.000000000 +0100 @@ -139,7 +139,7 @@ intel_02_known_compare (const void *p1, } -static long int +static long int __attribute__ ((noinline)) intel_check_word (int name, unsigned int value, bool *has_level_2, bool *no_level_2_or_3) { Jakub