When you run GCC
, you can use command-line options to choose
machine-specific details. For information on all the GCC
command-line
options, see section `GNU CC Command Options' in Using GNU CC.
Some special compiler command-line options are available for
SPARClite
; in addition, the machine-dependent options already
present for SPARC in general continue to be available. Both kinds of
options are described in section `SPARC Options' in Using GNU CC.
-msparclite
GCC
generate code for the
common subset of the instruction set: the v7 variant of the SPARC
architecture.
`-msparclite' (which is on automatically for any of the
SPARClite
configurations) gives you SPARClite
code.
This adds the integer multiply (smul
and umul
, just as in
SPARC v8), integer divide-step (divscc
), and scan (scan
)
instructions which exist in SPARClite
but not in SPARC v7.
Using `-msparclite' when you run the compiler does not,
however, give you floating point code that uses the entry points for US
Software's GOFAST library.
-mv8
smul
and
umul
) and integer divide (sdiv
and udiv
)
instructions which exist in SPARC v8 but not in SPARC v7.
-mf930
SPARClite
chip without an FPU. This option is equivalent to the
combination `-msparclite -mno-fpu'.
`-mf930' is the default when the compiler is configured
specifically for SPARClite
.
-mf934
SPARClite
chip
with an FPU. This option is equivalent to `-msparclite'.
-mflat
The following command line options are available for both
SPARClite
and other SPARC configurations of the compiler.
See section `SPARC Options' in Using GNU CC.
-mno-epilogue
-mepilogue
When you run the compiler, you can specify whether to compile for
hardware or software floating point configurations with these
GCC
command-line options:
-mfpu
-mhard-float
-mflat
-msoft-float
-mno-fpu
SPARClite
GCC
configurations
generate subroutine calls compatible with the US Software `goFast.a'
floating point library, giving you the opportunity to use either the
`libgcc' implementation or the US Software version.
To use the US Software library, simply include `-lgoFast' on the
GCC
command line.
To use the `libgcc' version, you need nothing special; GCC
links with `libgcc' automatically after all other object files and
libraries.
Two kinds of floating point subroutines are useful with GCC
:
GCC
options `-msoft-float' or
`-mno-fpu'), the SPARClite
configurations of
GCC
generate calls compatible with the U.S. Software
GOFAST library. If you do not have this library, you can still use
software floating point; `libgcc', the auxiliary library distributed with
GCC
, includes compatible--though slower--subroutines.