Re: [HELP] [PORT] sparc vs sparc5 vs ultrasparc?

2004-12-27 Thread Martin
On Sat, 2004-12-25 at 21:34, Marcelo E. Magallon wrote:
 Hi,
 
  mesa upstream includes configuration files for three Sparc
  architectures: sparc, sparc5 and ultrasparc.
snip
  3. Does this make sense?  AFAIUI the v8 has divide instructions which
 make it much more bearable than generic sparc code.
 
snip
The exact flags depend a bit on the version of gcc you're using,
assuming you're using = 3.3 :

Broadly speaking see
http://gcc.gnu.org/onlinedocs/gcc-3.3/gcc/SPARC-Options.html#SPARC-Options
However, for what it's worth I would be tempted to rename (upstream) the
three architectures sparcv7, sparcv8 and sparcv9, respectively using

CFLAGS=-mcpu=v7 -mtune=cypress
CFLAGS=-mcpu=v8 -mtune=v8
CFLAGS=-mcpu=v9 -mtune=ultrasparc

If you're using = 3.4 then add -mvis to the sparcv9 architecture.  This
is morally the same as what you had before and gives a good portability
/ optimality trade off.  Then build the sparcv8 version for the default
package for the (Debian) sparc architecture and create a second package
with an optimised version for UltraSparc machines (using the upstream
sparcv9).

HTH

Cheers,
 - Martin
 
-- 
Martin
[EMAIL PROTECTED]
Seasons change, things come to pass



Re: [HELP] [PORT] sparc vs sparc5 vs ultrasparc?

2004-12-26 Thread James A. Morrison

Marcelo E. Magallon [EMAIL PROTECTED] writes:
  ultrasparc:
 
 CC = gcc
 CXX = g++
 CFLAGS = -mv8 -mtune=ultrasparc ... # the rest is the same as sparc

 These should be fine for Sarge on SPARC.  v8 is the default instruction
set for Sarge and tuning for ultrasparc isn't such a bad thing.
 


-- 
Thanks,
Jim

http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim



Re: [HELP] [PORT] sparc vs sparc5 vs ultrasparc?

2004-12-26 Thread Marcelo E. Magallon
On Sun, Dec 26, 2004 at 01:54:10AM -0500, James A. Morrison wrote:

  Marcelo E. Magallon [EMAIL PROTECTED] writes:
ultrasparc:
   
   CC = gcc
   CXX = g++
   CFLAGS = -mv8 -mtune=ultrasparc ... # the rest is the same as sparc
  
   These should be fine for Sarge on SPARC.  v8 is the default
   instruction set for Sarge and tuning for ultrasparc isn't such a bad
   thing.

 Thanks.  What does default instruction set mean?  I *am* providing a
 library compiled with only -O2.  What I'm looking for here is to
 provide an optimized library *too*.  From my understanding this can
 make a significant difference on Sparc.  Should I use -mv9 for that?

 Marcelo



Re: [HELP] [PORT] sparc vs sparc5 vs ultrasparc?

2004-12-26 Thread James A. Morrison

Marcelo E. Magallon [EMAIL PROTECTED] writes:

 On Sun, Dec 26, 2004 at 01:54:10AM -0500, James A. Morrison wrote:
 
   Marcelo E. Magallon [EMAIL PROTECTED] writes:
 ultrasparc:

CC = gcc
CXX = g++
CFLAGS = -mv8 -mtune=ultrasparc ... # the rest is the same as sparc
   
These should be fine for Sarge on SPARC.  v8 is the default
instruction set for Sarge and tuning for ultrasparc isn't such a bad
thing.
 
  Thanks.  What does default instruction set mean?  I *am* providing a
  library compiled with only -O2.  What I'm looking for here is to
  provide an optimized library *too*.  From my understanding this can
  make a significant difference on Sparc.  Should I use -mv9 for that?
 
  Marcelo

 -mcpu=ultrasparc would be good for the optimized libraries.

-- 
Thanks,
Jim

http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim



[HELP] [PORT] sparc vs sparc5 vs ultrasparc?

2004-12-25 Thread Marcelo E. Magallon
Hi,

 mesa upstream includes configuration files for three Sparc
 architectures: sparc, sparc5 and ultrasparc.

 sparc (this is actually the same as linux)

CC = gcc
CXX = g++

 sparc5:

CC = gcc
CXX = g++
CFLAGS = -mcpu=ultrasparc ... # the rest is the same as for sparc

 ultrasparc:

CC = gcc
CXX = g++
CFLAGS = -mv8 -mtune=ultrasparc ... # the rest is the same as sparc

 Questions:

 1. Will that work on *any* current Sparc autobuilder?

 2. I have to put the sparc libraries in /usr/lib, where do I put the
sparc5 and ultrasparc ones?

 3. Does this make sense?  AFAIUI the v8 has divide instructions which
make it much more bearable than generic sparc code.

 4. There's some assembly versions of a couple of routines, but they are
only used on sunos, not linux.  I don't know if these are maintained
or not.  Is someone willing to try this out and tell me if these
work?  Grep for USE_SPARC_ASM in the mesa sources (6.2.1 from
upstream).

 TIA,

Marcelo



Re: [HELP] [PORT] sparc vs sparc5 vs ultrasparc?

2004-12-25 Thread David S. Miller
On Sat, 25 Dec 2004 15:34:17 -0600
Marcelo E. Magallon [EMAIL PROTECTED] wrote:

  4. There's some assembly versions of a couple of routines, but they are
 only used on sunos, not linux.  I don't know if these are maintained
 or not.  Is someone willing to try this out and tell me if these
 work?  Grep for USE_SPARC_ASM in the mesa sources (6.2.1 from
 upstream).

That's a bug in the Makefiles, Linux/Sparc should make use of
them too.  They are maintained and work, I wrote them I should
know :-)



Re: [HELP] [PORT] sparc vs sparc5 vs ultrasparc?

2004-12-25 Thread Marcelo E. Magallon
On Sat, Dec 25, 2004 at 02:05:24PM -0800, David S. Miller wrote:

4. There's some assembly versions of a couple of routines, but
   they are only used on sunos, not linux.  I don't know if these
   are maintained or not.  Is someone willing to try this out and
   tell me if these work?  Grep for USE_SPARC_ASM in the mesa
   sources (6.2.1 from upstream).
  
  That's a bug in the Makefiles, Linux/Sparc should make use of them
  too.  They are maintained and work, I wrote them I should know :-)

 Yes, I still remember :-)

 Thanks for the heads up, I'll fix the makefiles and post and patch to
 mesa-dev.

 Marcelo