Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!rex!ames!vsi1!daver!bungi.com!news From: culberts@hplwbc.hpl.hp.com (Bruce Culbertson) Newsgroups: comp.sys.nsc.32k Subject: Re: strtol.c Message-ID: <9103191744.AA06048@hplwbc.hpl.hp.com> Date: 19 Mar 91 17:44:28 GMT Sender: news@daver.bungi.com Lines: 22 Approved: news@daver.bungi.com >Has anyone found away to compile /usr/src/lib/ansi/strtol.c ?? >ie.: > as: line 124, value too large for displacement > GCC has a predicate which answers the question: can a given expression be calculated using an some addressing mode of the CPU? When the answer is yes, GCC emits a single instruction; when it is no, GCC emits instructions to simplify the expression and then calls the predicate again. This is the mechanism through which GCC takes advantage of fancy addressing modes on CISC CPU's like the 32532. A bug is this code causes GCC to occasionally output a single instruction which includes a constant which is too big to represent in the appropriate addressing mode. The assembler correctly complains. If you are using GCC 1.35 (the compiler I distributed) and you see this problem, drop the -O option if you were using it, or add -O if you weren't. This work-around has always allowed me to compile files which exposed this bug. Someone (Ian?) posted a fix to gnu.gcc.bug which may have been incorporated into later versions of the compiler.