From owner-freebsd-stable Wed Oct 7 06:33:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA18696 for freebsd-stable-outgoing; Wed, 7 Oct 1998 06:33:24 -0700 (PDT) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from king.ki.informatik.uni-frankfurt.de (king.ki.informatik.uni-frankfurt.de [141.2.10.16]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA18341 for ; Wed, 7 Oct 1998 06:31:02 -0700 (PDT) (envelope-from marko@king.ki.informatik.uni-frankfurt.de) Received: (from marko@localhost) by king.ki.informatik.uni-frankfurt.de (8.7.1/8.7.1) id PAA22126; Wed, 7 Oct 1998 15:30:38 +0200 (METDST) Date: Wed, 7 Oct 1998 15:30:38 +0200 (METDST) Message-Id: <199810071330.PAA22126@king.ki.informatik.uni-frankfurt.de> From: Marko Schuetz MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: freebsd-stable@FreeBSD.ORG Subject: Global register variables in gcc and stdio.h?!? X-Mailer: VM 6.34 under Emacs 20.2.1 Reply-To: marko@cs.uni-frankfurt.de Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG An application I want to compile runs much faster if it can use global register variables. Trying to compile it I get [...] gmake[1]: Entering directory `/usr/home/marko/src/mercury-0.7.3.orig/runtime' MERCURY_C_INCL_DIR=. ../scripts/mgnuc --grade asm_fast.gc --no-ansi -I../runtime -I../boehm_gc -g -c label.c -o label.o In file included from regs.h:67, from imp.h:36, from label.c:19: machdeps/i386_regs.h:61: global register variable follows a function definition machdeps/i386_regs.h:62: global register variable follows a function definition machdeps/i386_regs.h:67: global register variable follows a function definition gmake[1]: *** [label.o] Error 1 gmake[1]: Leaving directory `/usr/home/marko/src/mercury-0.7.3.orig/runtime' gmake: *** [runtime] Error 2 I checked the preprocessor output and found that there is only the function definition for `static __inline int __sputc(int _c, FILE *_p)` which is included from stdio.h. Depending on an #ifdef that version of __sputc or an alternative as a macro is used. I would suggest adding something like !defined(__USE_GLOBAL_REGISTER_VARIABLES__) to the condition for using the inline function. Doing that allows at least mercury to compile using global register variables. Please comment. Marko To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message