Subject: re: a couple of low level questions
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: matthew green <mrg@eterna.com.au>
List: port-sparc
Date: 01/06/2003 13:41:35
   >> usr/src/lib/libc/arch/sparc/gen/divrem.m4
   > What I mean is, where can I see the code which detects whether to use
   > the library code (e.g. usr/src/libc/arch/sparc/gen/divrem.m4) or
   > whether do do it in hardware directly (e.g. with a udiv instruction)?
   
   I suspect that you have to do that manually (eg, something like -mv8
   when compiling).  Maybe one of the SPARC toolchain wizards can tell us?


you can use "cc -mv8" to make GCC output div/mul/rem instructions
directly rather than calling .udiv, etc., yes.

this is still going to be faster than the netbsd-current implementation
that calls a function that is simply the instruction (with a couple
of helper instructions as well), but the latter means the same binary
works nicely on both V7 and V8.

FWIW, i use "-O2 -mcpu=supersparc -mtune=supersparc" for all my V8
machines.


.mrg.