delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/15/07:16:30

Message-Id: <199704151101.NAA14751@math.amu.edu.pl>
Comments: Authenticated sender is <grendel AT ananke DOT amu DOT edu DOT pl>
From: "Mark Habersack" <grendel AT hoth DOT amu DOT edu DOT pl>
Organization: PPP (Pesticide Powered Pumpkins)
To: Gisle Vanem <giva AT bgnett DOT no>
Date: Tue, 15 Apr 1997 13:02:43 +0100
MIME-Version: 1.0
Subject: Re: Using -m486
Reply-to: grendel AT hoth DOT amu DOT edu DOT pl
CC: djgpp AT delorie DOT com
In-reply-to: <199704141402.OAA24919@bryggen.bgnett.no>

Once upon a time (on 14 Apr 97 at 14:02) Gisle Vanem said:

> "Mark Habersack" <grendel AT hoth DOT amu DOT edu DOT pl> said:
> 
> >> When compiling with `gcc -V', there's no extra define for `-m486'.
> > You may fiddle a little with the lib/specs file. There is no documentation
> > for it AFAIK, but you should be able to determine how to add a conditional
> > switch to define M486 or M386. Beware however, that this introduces a
> > serious incompatibility to your program - you'd have to be sure that
> > everyone compiling your program uses your specs as well. Besides, why
> > would you need such a macro?
> 
> Why? because BSWAP is an 486+ instruction, and I want to make this
> Waterloo TCP/IP program run faster. TCP/IP (as you probably know)
> does a lot of byte swapping between little/big-endian formats.
Hmm... The -m486 won't do what you want. It merely instructs the optimizer to 
optimize code for i486 ordering of instructions and their timings. It doesn't 
mean it will use BSWAP to swap bytes. *It will not* do that. You 
can hand-code these instructions where you need'em. The -m386 -m486 *do not* 
choose the instruction set specific for the CPU they *seem* to select. -m486 
will still use only i386 instructions - how otherwise would programs compiled 
with -m486 run on i386? Besides I suspect such optimization would be very 
costly in terms of optimizer time.
==================================================
Stand straight, look me in the eye and say goodbye
Stand straight, we drifted past the point of
  reasons why.
Yesterday starts tommorow, tommorow starts today
And the problems seem to be we're picking up the
  pieces of a ricochet...

- Raw text -


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