🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #49547

Re: gcc and SPARC 10

#49547
From: David Robinson
Date: Tue, 04 Jan 1994 17:44
77 lines
3814 bytes
In article <1994Jan4.125445.3875@wavehh.hanse.de> cracauer@wavehh.hanse.de (Martin Cracauer) writes:
>I just read in 'INSTALL' of gcc-2.5.7:
>>    The GNU compiler does not really support the Super SPARC processor
>> that is used in SPARC Station 10 and similar class machines.  You can
>> get code that runs by specifying `sparc' as the cpu type; however, its
>> performance is not very good, and may vary widely according to the
>> compiler version and optimization options used.  This is because the
>> instruction scheduling parameters designed for the Sparc are not correct
>> for the Super SPARC.  Implementing scheduling parameters for the Super
>> SPARC might be a good project for someone who is willing to learn a
>> great deal about instruction scheduling in GNU CC.

* It's not quite as bad as this makes out.

>I've got a few questions on this. If someone knows the answers, please
>let me know. 
>
>? Does this mean, that SPARC 10 needs special Code that would not run
>  on vanilla SPARC anymore? [I assume yes]

* No.

Some comments: There are two (orthogonal) issues here; firstly, the instruction
set that the compiler generates and secondly instruction scheduling for a
specific cpu.

On the first point, there are two versions of the SPARC architechture around;
V7 and V8.
Old cypress and ross chips (SS1, IPX, SS2) etc. are V7.
Micro sparc (tsunami, in the Classic) and SuperSparc (Viking, in the SS10) are
V8.

V7 code will run on a V8 cpu. V8 code will run on the V7 sun workstations, as
the OS emulates the missing instructions.

Gcc can already generate the extra V8 instructions (integer multiply and
divide); see the -mv8 flag. Using this flag on a V7 machine would produce
very slow code.

However, currently gcc cannot optimise the ordering of machine instructions
for the specific features of the Viking cpu chip. Doing such optimisations
would not greatly affect running time on V7 machine.

>? How much faster would native SPARC 10 code be.?
>  10-20%? 50%?  100-200%?
>
>? Does this apply to integer or floating point or both?

* With the current version of gcc, perhaps 10-30%.

Comment: at the moment, gcc does not have a model for superscalar processors.
More improvment would be possible if gcc knew about the restrictions on
issuing multiple instructions in a cycle. This would also help the alpha,
PA7100 etc. ports.

>
>? How solves the unbundled Sun compiler this problem? Does it have a
>  switch to produce native SPARC 10 code?

* Yes. -cg92. This produces V8 code and produces SS10 specific optimisations,
  (I think).
>
>? If native SPARC 10 code doesn't run on older SPARC, is all the
>  software distributet in binary form compiled for old SPARC and don't
>  make use of SPARC 10? Or is there a mechanism to have two code
>  versions in one binary?

* You only need avoid the V8 instructions; you can still optimise the
  code for the Viking cpu.

>? And last but not least (you guessed it :-): are there plans to make
>  gcc able to produce native SPARC 10 code this year?
>

* ???

 David Robinson. (drtr@mail.ast.cam.ac.uk)
Technical Details
Message-ID: <1994Jan4.174436.12585@infodev.cam.ac.uk>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!howland.reston.ans.net!pipex!pavo.csi.cam.ac.uk!drtr
References: <1994Jan4.125445.3875@wavehh.hanse.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,2ade940486b74481
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1994-01-04 10:10:06 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!sol.ctr.columbia.edu!howland.reston.ans.net!pipex!pavo.csi.cam.ac.uk!drtr
From: drtr@mail.ast.cam.ac.uk (David Robinson)
Subject: Re: gcc and SPARC 10
Message-ID: <1994Jan4.174436.12585@infodev.cam.ac.uk>
Sender: news@infodev.cam.ac.uk (USENET news)
Nntp-Posting-Host: coral.ast.cam.ac.uk
Organization: Institute of Astronomy, Cambridge
References: <1994Jan4.125445.3875@wavehh.hanse.de>
Date: Tue, 4 Jan 1994 17:44:36 GMT
Lines: 77