*BSD News Article 51475


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!news.mathworks.com!solaris.cc.vt.edu!news.seanet.com!news.seanet.com!michaelv
From: michaelv@MindBender.HeadCandy.com (Michael L. VanLoon)
Newsgroups: comp.unix.bsd.bsdi.misc,gnu.gcc
Subject: Re: usefulness of -m486 to gcc 2.6.3 (BSDI 1.1,2.0) on Pentiums
Date: 24 Sep 1995 04:07:48 GMT
Organization: HeadCandy Associates... Sweets for the lobes.
Lines: 39
Message-ID: <MICHAELV.95Sep23210751@MindBender.HeadCandy.com>
References: <43v83k$91b@olympus.nwnet.net> <x7zqfwgpe7.fsf@falcon.mbsa.com>
NNTP-Posting-Host: mindbender.seanet.com
In-reply-to: Doug Maxey's message of 23 Sep 1995 02:51:13 -0500
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.bsdi.misc:941 gnu.gcc:1974

In article <x7zqfwgpe7.fsf@falcon.mbsa.com> Doug Maxey <Doug.Maxey@mbsa.com> writes:

   In article <43v83k$91b@olympus.nwnet.net>
     aad@nwnet.net (Anthony D'Atri) writes:

   >We're running BSDI 1.1 and 2.0 on Pentium boxes, and I do most compilation
   >with gcc 2.6.3 (via shlicc2).  Is it to my advantage to compile with -m486?

   No, not really. I found no instances where this causes any special
   isns to be issued.  Try asking support@bsdi.com if they tweaked the
   delivered version to use the flag.

My understanding is that it doesn't actually cause different isns to
be issued, specifically, but in some cases can cause instructions to
be mixed differently to take advantage of quicker single-cycle
instructions on 486 and higher CPUs.  In effect using more of the
simpler instructions (which is quicker on a 486+) than a single
complex instruction.  But, more importantly, it packs the structures
on 16-byte boundaries, instead of four-byte boundaries, which causes
more efficient cache-line fetching.  This is supposed to speed up code
slightly on 486+ CPUs, but slightly degrade performance on 386s.

Note, all of this is just stuff that collected in my head over the
last couple years.  I couldn't tell you first hand whether the actual
code accomplishes this.  But, the XFree86 people claim approximately a
10% speedup with -m486 when the X binaries are run on 486 and Pentium
CPUs.  So, it has to be doing something.  Also, I've noticed -m486
binaries are slightly larger, which leads me to conclude that the
things stated in my first paragraph are actually happening.


--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Michael L. VanLoon                                 michaelv@HeadCandy.com
       --<  Free your mind and your machine -- NetBSD free un*x  >--
     NetBSD working ports: 386+PC, Mac 68k, Amiga, HP300, Sun3, Sun4,
                           DEC PMAX (MIPS), DEC Alpha, PC532
     NetBSD ports in progress: VAX, Atari 68k, others...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -