Optimal compile flags for ultra2 & power2

John Carr jfc@mit.edu
Tue Sep 22 09:51:00 GMT 1998

>    I was wondering what flags people use for best FP performance on these -
>    a) Sun ultra2
> -O2 -mtune=ultrasparc -fcall-used-g4 -fcall-used-g5 -fcall-used-g7

%g7 is used by the Solaris thread library, so don't use -fcall-used-g7
in multithreaded programs (which includes any program using XIL in
Solaris 2.6).

-mcpu=ultrasparc will enable the V9 floating point instructions and
should improve performance on an Ultra; code compiled with this switch
will not run on older SPARCs.

More information about the Gcc mailing list