Mail Archives: djgpp/1997/04/15/16:23:15
On Tue, 15 Apr 1997, Gisle Vanem wrote:
> > 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.
>
> I know. I should maybe clearer in my original post. My intention was to
> check (at runtime) if CPU was 486+ before running the code compiled with
> BSWAP. The BSWAP should be an inline asm function (coded using .byte xx
> since
> gas knows nothing about 486+ instructions).
In such a situation a better solution would be to write a simple utility that
would return 3 for i386 and 4 for i486 and based on the return code you would
set an environmet variable in the makefile
> > 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?
>
> Gisle Vanem ---- Nera Telecomm ASA tel. +47-55-225633
> SW Eng. P.O.Box 10 fax. +47-55-225651
> 5061 Kokstad, NORWAY email: giva AT bgnett DOT no
> gv AT nera DOT no
>
- Raw text -