Date: Tue, 28 May 1996 14:08:17 +0800 (GMT+0800) From: Orlando Andico To: Alexander Larsson cc: djgpp AT delorie DOT com Subject: Re: Pentium Optimized GCC In-Reply-To: <31ACF009.380@lysator.liu.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 > 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