Reply-To: From: "Arthur" To: "DJGPP Mailing List" , Subject: RE: How safe is the -march=pentium flag? Date: Mon, 10 Aug 1998 16:46:27 +0100 Message-ID: <000101bdc476$090d6620$244e08c3@arthur> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Importance: Normal In-Reply-To: <6qmqma$mcp$1@nnrp1.dejanews.com> Precedence: bulk > Hello Everyone, > > I've just been playing with the -march flags and found a huge speed increase > when I used -march=pentuim. If this works so good, why is there a push for a > pentium optimized gcc? There is a pentium optimised version - PGCC. Look for the other postings I've sent (Subject: PGCC) for more details. PGCC replaces -march=pentium and several other optimisation flags (and a few more that it adds) with -O7 and a few new flags (such as -frisc). It just optimises the instruction set, alignment etc used for one more suited for the Pentium. > Doesn't -march=pentium make pentium optimized code? AFAIK it only aligns the instructions for a Pentium. Code using -march=pentium will still work on older machines. > It does seem to speed things up alot. I had tried PGCC and was a little > disappointed with the speed increases so I stayed with regular Djgpp. Now it > seems that I had a pentium optimizing compiler all along. I'm confused... PGCC produces pentium (& compatibles) specific code. -march=pentium just aligns the code. You could try -mcpu=pentium to force GCC to make pentium specific code, but choosing -O7 from the PGCC does that anyway. There are other flags for PGCC that can't be used with GCC, but they're not very well documented. In the readme file that comes with it, it says that you should fiddle around with the settings until you find the right combination for the program. Having said that, I've seen little difference over using -O7 than using -mpentium, -march=pentium and -mcpu=pentium together. Anyone? James Arthur jaa AT arfa DOT clara DOT net ICQ#15054819