www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/29/23:35:12

Date: Tue, 28 May 1996 14:08:17 +0800 (GMT+0800)
From: Orlando Andico <orly AT abigail DOT eee DOT upd DOT edu DOT ph>
To: Alexander Larsson <alla AT lysator DOT liu DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: Pentium Optimized GCC
In-Reply-To: <31ACF009.380@lysator.liu.se>
Message-ID: <Pine.LNX.3.91.960528140253.2573E-100000@abigail.eee.upd.edu.ph>
MIME-Version: 1.0

On Wed, 29 May 1996, Alexander Larsson wrote:

> I have patched/compiled it for djgpp.
> The patching is easy, just download gcc272s.zip
> from some djgpp site. Download the patches.
> Then run:
>   patch <patch.diff (or whatever it's called)
> 
> I don't know why, but the patching failed miserably 
> on my dos machine, so i had to do the patching on 
> a unix machine, but it worked great.
> (Makefile and Makefile.in failed, but i patched them 
>  manually, its just some CFLAG= -O2 to add)
> 
> 
>  Then i just did 
>    configure go-32
>    make
> 
>  which produced cc1 and xggc which i copied to my bin dir.
> 
> 
> There is only one problem, i don't know if i do 
> something wrong, because when i compiled a program
> with -mpentium -O6 (or -O3) it actually got SLOWER!
> Not much, but still. The docs mention 5% always and
> up to 30% in extreme cases. Dunno why, first time i
> build gcc, i might have done something wrong.
> 
> Has anyone else tried this?

I read the same post and also built the Pentium-GCC (not using DJGPP 
though, I used Linux). I've never built GCC for MS-DOG so please don't 
take offense if I'm off the mark.

The thing is, when building GCC, the first build is *always* done with -g 
(debugging) and *without* -O (optimize) so as not to stress some 
braindead compilers. Of course, if you're building GCC with GCC, you 
should edit the Makefile such that the stage1 compiler is already built 
with -O2 or whatever...

However, I haven't done that. From your description, you didn't build the 
stage1 and stage2 compilers anymore (at least, you didn't mention it). I 
think the *best* solution would be:

a) build the stage1 compiler in the appropriate way (you should have done 
   something like this):

   configure go-32
   make LANGUAGES=c
   make stage1

b) move that stuff into the stage1 directory (actually, make stage1 does
   that)

c) edit the Makefile so that stage2 is built with -O3 (or even -O6 if you're
   that confident in the Pentium Compiler Group  ;)

d) make stage2 (the actual syntax is in the INSTALL file). this way, the
   second-stage GCC will be built *with Pentium optimizations* builtin


FWIW, I haven't done any "real" tests, but I rebuilt my Linux kernel 
using the Pentium-GCC, and the BogoMIPS output shows no difference (!!!) 
of course, the BogoMIPS loop could've been done with asm, which would 
explain it...

Cheers,

Orly
orly AT mozcom DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019