This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 3.3 is not able to compile quakeforge cvs with cpu optimization greater than pentium 1


> What I've found is if you do any of the following:
>
> 1. Make -march=586 or less (486/386) OR remove entirely
> 2. make -O3 -O OR remove entirely
> 3. remove -ffast-math
>
> the assembler does not complain about being given junk and the file
> compiles. Note I have not actually tested if the output is correct by
> trying to run the resulting program, which I will do if given enough
> time *and* told I should do that (I don't like barking at the wrong
> tree)

The bug is triggered only with the -m(cpu|arch)=k6* options because GCC 
doesn't emit the short range 'loop' instructions for any other models of x86 
processors.

> I'm a novice at these things, and I just plain don't have the *time* to
> guess in a 2597 line c file what might possibly cause the problem,
> especially as my computer is rather slow. :(

GCC wrongly estimates the cumulative length of the instructions between the 
'loop' instruction and its target and thinks it can safely emit a short 
range (-128/+127 bytes) 'loop' instructions while the target is out of 
range.

> I have attached the bzip2 -9'd .i file resulting from:

Thanks. I filed PR target/11044 with the GCC bugzilla on your behalf and 
attached your testcase (you can add your e-mail address to the Cc field if 
you want to be informed of the subsequent events, for some reason I wasn't 
able to do that myself).

Note that the testcase is correctly compiled by GCC 3.2.3 (but not by earlier 
GCC 3.2.x releases) because this version already contains several patches 
aimed at fixing this problem.

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]