delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/12/14/11:22:57

Date: Mon, 14 Dec 1998 18:20:10 +0200 (WET)
From: Andris Pavenis <pavenis AT ieva05 DOT lanet DOT lv>
To: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
cc: djgpp-workers AT delorie DOT com
Subject: RE: egcs-1.1.1
In-Reply-To: <m0zpZpF-000S5EC@inti.gov.ar>
Message-ID: <Pine.A41.4.05.9812141756520.24444-100000@ieva05.lanet.lv>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com


On Mon, 14 Dec 1998, Salvador Eduardo Tropea (SET) wrote:

> > >   I saw that egcs is using -march=i586 -mcpu=i586 by default, is that in 
> > 
> > I tried both specs from DJGPP-2.02 and egcs-1.1.1 binary archives
> > (however I used not archives I uploaded in begin of the month, but archives
> > I'm going to upload as release). Tested that binaries generated by egcs-1.1.1
> > on old 386DX40 and all worked (tried RHIDE-1.4.7 I built saturday with
> > egcs-1.1.1)
> 
> egcs and gcc generates 386 compatible code even with march and mcpu =586.
>  

Seems really that code generated with options -mcpu=pentium -march=pentium
is still compatible with 386. Tested egcs-1.0.3 distributed with 
Slackware-3.6 (I'm using egcs-1.1.1 also in Linux, but for such test
"official" binaries are needed):

    rm -f foo.c
    touch foo.c
    gcc -S -V egcs-2.90.29 -fverbose-asm foo.c

and I'm getting following assembler output:
---------------------------------------------------------------------
	.file	"foo.c"
	.version	"01.01"
/ GNU C version egcs-2.90.29 980515 (egcs-1.0.3 release) (i586-pc-linux-gnulibc1) compiled by GNU C version egcs-2.90.27 980315 (egcs-1.0.2 release).
/ options passed:  -fverbose-asm
/ options enabled:  -fpeephole -ffunction-cse -fkeep-static-consts
/ -fpcc-struct-return -fcommon -fverbose-asm -fgnu-linker -fargument-alias
/ -m80387 -mhard-float -mno-soft-float -mieee-fp -mfp-ret-in-387
/ -mschedule-prologue -mcpu=pentium -march=pentium

gcc2_compiled.:
	.ident	"GCC: (GNU) egcs-2.90.29 980515 (egcs-1.0.3 release)"
---------------------------------------------------------------------

I think still rather many poeple is trying to compile something on 486
(maybe even on 386) with Slackware distribution installed and I haven't
heard about problems. However of course one can force default -march=i386
from specs. At least I have seen one code generation problem with
-march=i386 that disappears with -march=i486 or -march=pentium. However
I should also exclude possibility that HAIFA scheduler is guilty in that
(if so then I should rebuild egcs without configure option --enable-haifa)

egcs-1.1.1 binaries for DJGPP themselves are built with such compiler 
(so also the same options) and I didn't saw any problem on i386 as far as
I tested (of course it's working slowly)

Andris

- Raw text -


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