Man Page fpversion.1




NAME

     fpversion - print information about the system CPU	and FPU


SYNOPSIS

     fpversion [ -foption ]


DESCRIPTION

     fpversion prints information about	the system  CPU	 and  all
     available	floating-point	hardware  on the standard output.
     fpversion is available only on SPARC platforms.

     Invoked without an	argument, some of the following	 informa-
     tion  will	 be  displayed:	  CPU  type and	approximate clock
     rate, FPU type, apparent mask number and  approximate  clock
     rate,  and	highest	performance SPARC ABI-compliant	floating-
     point code	 generation  option.   The  type  of  information
     displayed	depends	 upon  the  system and the floating-point
     hardware available.  The clock rate is derived by	executing
     instructions  in  a loop and timing with getrusage(2) and is
     thus somewhat variable.


OPTIONS

     -foption	 Prints	  the	fastest	   SPARC    ABI-compliant
		 floating-point	 code  generation option for that
		 particular system.  This usage	is  intended  for
		 shell	scripts	 and  Makefiles	that compile pro-
		 grams but note	that the output	does not  include
		 a leading -".


EXAMPLES

     demo% fpversion
      A	SPARC-based CPU	is available.
      Kernel says CPU's	clock rate is 1062.0 MHz.
      Kernel says main memory's	clock rate is 177.0 MHz.

      Sun-4 floating-point controller version 0	found.
      An UltraSPARC chip is available.

      Use "-xtarget=ultra3i -xcache=64/32/4:1024/64/4" code-generation option.

      Hostid = 0x83270XXX.

     demo% fpversion -foption
     xtarget=ultra3i -xcache=64/32/4:1024/64/4


     Use fpversion on compiler command lines:

       cc -`fpversion -foption`	any.c

     corresponds to

       cc -xtarget=ultra2i -xcache=16/32/1:2048/64/1 any.c


NOTES

     On	UltraSPARC platforms,  the  fastest  SPARC  ABI-compliant
     floating-point  code  generation option does not exploit the
     full potential of the underlying  hardware.   If  SPARC  ABI
     compliance	 is  not a consideration, use the code generation
     option   of   -xtarget=native    in    32-bit    mode    and
     -xtarget=native64 in 64-bit mode to better	utilize	the SPARC
     hardware present.