Mail Archives: djgpp/1997/04/15/07:16:30
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 -