Quote:>Does anyone know of a way to optimize a long long multiplication on a
>UltraSPARC-II? If not, is there a way to detect an overflow when
>multiplying two integers.
Run 2.5.1.; you'll find that there's a __mul64 defined in
/usr/platform/sun4u/lib/libc_psr.so.1 and this
UltraSPARC specific one does the mulx in hardware.
(Note that this requires that you use Sun's C compiler as
gcc includes it's own, non UltraSPARC enhanced, 64 bit
integer ops)
Casper
--
Casper Dik - Sun Microsystems - via my guest account at the University
Statements on Sun products included here are not gospel and may
be fiction rather than truth.