Date: Wed, 7 Oct 1998 15:30:38 +0200 (METDST) From: Marko Schuetz <marko@ki.informatik.uni-frankfurt.de> To: freebsd-stable@FreeBSD.ORG Subject: Global register variables in gcc and stdio.h?!? Message-ID: <199810071330.PAA22126@king.ki.informatik.uni-frankfurt.de>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810071330.PAA22126>