Contents|Index|Previous|Next

DEC Alpha Options

The following -m’ options are defined for the DEC Alpha implementations.

-mno-soft-float
-msoft-float
Use (do not use) the hardware floating-point instructions for floating-point operations. When -msoft-float is specified, functions in libgcc1.c will be used to perform floating-point operations. Unless they are replaced by routines that emulate the floating-point operations, or compiled in such a way as to call such emulation routines, these routines will issue floating-point operations. If you are compiling for an Alpha without floating-point operations, you must ensure that the library is built so as not to call them.
-mfp-reg
-mno-fp-regs
Generate code that uses (does not use) the floating-point register set. -mno-fp-regs implies -msoft-float. If the floating-point register set is not used, floating point operands are passed in integer registers as if they were integers and floating-point results are passed in $0 instead of $f0.
This is a non-standard calling sequence, so any function with a floating-point argument or return value called by code compiled with -mno-fp-regs must also be compiled with that option. A typical use of this option is building a kernel that does not use, and hence need not save and restore, any floating-point registers.
-mieee
The Alpha architecture implements floating-point hardware optimized for maximum performance. It is mostly compliant with the IEEE floating point standard. However, for full compliance, software assistance is required. This option generates code fully IEEE compliant code except that the
inexact flag is not maintained (contrast following description for -mieee-with-inexact). If this option is turned on, the CPP macro, _IEEE_FP, is defined during compilation.
The option is a shorthand for ‘-D_IEEE_FP -D_IEEE_FP_INEXACT’ plus ‘-mieee-conformant’, and ‘-mfp-trap-mode=sui’, and ‘-mtrap-precision=i’.
The resulting code is less efficient but is able to correctly support denormalized numbers and exceptional IEEE values such as not-a-number and plus/minus infinity.
Other Alpha compilers call this option ‘-ieee_with_no_inexact’.
-mieee-with-inexact
This is like ‘
-mieee’ except the generated code also maintains the IEEE inexact flag. Turning on this option causes the generated code to implement fully-compliant IEEE math. The option is a shorthand for
-D_IEEE_FP -D_IEEE_FP_INEXACT’ plus ‘-mieee-conformant’, and ‘-mfp-trap-mode=sui’, and ‘-mtrap-precision=i’. On some Alpha implementations the resulting code may execute significantly slower than the code generated by default. Since there is very little code that depends on the inexact flag, you should normally not specify this option. Other Alpha compilers call this option ‘-ieee_with_inexact’.
-mfp-trap-mode=trap mode
This option controls what floating-point related traps are enabled. Other Alpha compilers call this option ‘
-fptmtrap mode. The trap mode can be set to one of the following four values.
-mfp-rounding-mode=rounding mode
Selects the IEEE rounding mode. Other Alpha compilers call this option ‘
-fprmrounding mode. The rounding mode can be one of the following four values.
-mtrap-precision=trap precision
In the Alpha architecture, floating point traps are imprecise. This means without software assistance it is impossible to recover from a floating trap and program execution normally needs to be terminated. GNU CC can generate code that can assist operating system trap handlers in determining the exact location that caused a floating point trap. Depending on the requirements of an application, different levels of precisions can be selected, such as the following:
-mieee-conformant
This option marks the generated code as IEEE confor-mant. You must not use this option unless you also specify ‘
-mtrap-precision=i’ and either ‘-mfp-trap-mode=su’ or ‘-mfp-trap-mode=sui’. Its only effect is to emit the line ‘.eflag 48’ in the function prologue of the generated assem-bly file. Under DEC Unix, this has the effect that IEEE-conformant math library routines will be linked in.
-mbuild-constants
Normally GNU CC examines a 32- or 64-bit integer constant to see if it can construct it from smaller constants in two or three instructions. If it cannot, it will output the constant as a literal and generate code to load it from the data segement at runtime.
Use this option to require GNU CC to construct all integer constants using code, even if it takes more instructions (the maximum is six).
You would typically use this option to build a shared library dynamic loader. Itself a shared library, it must relocate itself in memory before it can find the variables and constants in its own data segment.