Subject: Re: should we be using -m486?
To: Max Bell <mbell@europa.com>
From: Michael L. VanLoon -- HeadCandy.com <michaelv@HeadCandy.com>
List: port-i386
Date: 12/14/1995 21:24:20
>>From: "Alex R.N. Wetmore" <alexw+@andrew.cmu.edu>

>>Excerpts from internet.computing.netbsd.port-i386: 13-Dec-95 Re: should
>>we be using -m486?  by M. HeadCandy.com@HeadCan 

>>> my 486.  It shouldn't appreciably slow down 386s.  And, the most
>>> important thing, it doesn't break on 386s.  People can use these
>>> binaries successfully on their 386s until they decide to rebuild their
>>> own binaries (if they even care).

>>Are you sure it doesn't break on 386s?  At one point AFS for NetBSD
>>was being compiled with -m486 and it didn't run on any of my friends
>>386s until the AFS/NetBSD developer built a binary compiled without
>>-m486.  I thought it might use the extra one or two instructions in the
>>486 instruction set...

>It would seem rather obvious to me that using the -m486 flag will allow
>the compiler to include 486-specific instructions in the resulting code.
>If a given program still works on a 386 it is due to luck, and should
>not be depended on.

All other discussions on this topic have been from the viewpoint that
it does absolutely nothing at all, to it just slightly rearranges the
sizes of certain memory structures to be on more granular alignments.

It has never been said, to my knowledge, that the -m486 does anything
as drastic as rearrange the instruction set.  I think the most it
might do is make the compiler prefer certain simpler instructions
where it normally would use one more complex instructions.  I don't
believe it uses any non-386 instructions, no matter what flags you
give it.

I don't know if they still do, but I'm almost positive I remember the
first few revisions of XFree86 were all compiled and released with
-m486, and nobody had any problems.

If, however, it is indeed found that the compiler can generate a
non-386 instruction in -m486 mode, then by all means, we shouldn't use
it.  Otherwise, I still say "go for it".

-----------------------------------------------------------------------------
  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...
-----------------------------------------------------------------------------