diff options
author | Maciej W. Rozycki <macro@codesourcery.com> | 2013-07-29 14:37:30 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@gcc.gnu.org> | 2013-07-29 14:37:30 +0000 |
commit | ff3f395157c42a6d2c922de085f5a890834f975b (patch) | |
tree | 4b72a5f006ea9267e8c0e91ce37fdae020e14228 /gcc/doc | |
parent | 576e2f37400cecb0cdb4537c7777284b7878e7c0 (diff) | |
download | gcc-ff3f395157c42a6d2c922de085f5a890834f975b.zip gcc-ff3f395157c42a6d2c922de085f5a890834f975b.tar.gz gcc-ff3f395157c42a6d2c922de085f5a890834f975b.tar.bz2 |
linux.h (GLIBC_DYNAMIC_LINKER): Handle `-mnan=2008'.
gcc/
* config/mips/linux.h (GLIBC_DYNAMIC_LINKER): Handle `-mnan=2008'.
(UCLIBC_DYNAMIC_LINKER): New macro.
* config/mips/linux64.h (GLIBC_DYNAMIC_LINKER32): Handle
`-mnan=2008'.
(GLIBC_DYNAMIC_LINKER64, GLIBC_DYNAMIC_LINKERN32): Likewise.
(UCLIBC_DYNAMIC_LINKER32): Undefine macro first. Handle
`-mnan=2008'.
(UCLIBC_DYNAMIC_LINKER64): Redefine macro.
(UCLIBC_DYNAMIC_LINKERN32): Likewise.
* config/mips/mips-modes.def: Remove RESET_FLOAT_FORMAT calls
for SF and DF modes. Use ieee_quad_format for TF mode.
* config/mips/mips-opts.h (mips_ieee_754_setting): New enum.
* config/mips/mips.c (mips_file_start): Output a `.nan' directive.
(mips_option_override): Handle `-mnan=legacy'.
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Handle
`-mabs=2008' and `-mnan=2008'.
(OPTION_DEFAULT_SPECS): Add "nan" default.
(ASM_SPEC): Handle `-mnan='.
[!HAVE_AS_NAN] (HAVE_AS_NAN): New macro.
* config/mips/mips.md (abs<mode>2): Handle `-mabs=2008', update
comment accordingly.
(neg<mode>2): Likewise.
* config/mips/mips.opt (mabs, mnan): New options.
* doc/install.texi (Configuration): Document `--with-nan=' option.
* doc/invoke.texi (Option Summary): List MIPS `-mabs=' and
`-mnan=' options.
(MIPS Options): Document them.
* config.gcc <mips*-*-*>: Handle `--with-nan='.
* configure.ac <mips*-*-*>: Check for GAS `-mnan=2008' support.
* configure: Regenerate.
* config.in: Regenerate.
gcc/testsuite/
* gcc.target/mips/fabs-2008.c: New test case.
* gcc.target/mips/fabs-legacy.c: New test case.
* gcc.target/mips/fabsf-2008.c: New test case.
* gcc.target/mips/fabsf-legacy.c: New test case.
* gcc.target/mips/fneg-2008.c: New test case.
* gcc.target/mips/fneg-legacy.c: New test case.
* gcc.target/mips/fneg-2008.c: New test case.
* gcc.target/mips/fneg-legacy.c: New test case.
* gcc.target/mips/nan-2008.c: New test case.
* gcc.target/mips/nan-legacy.c: New test case.
* gcc.target/mips/nanf-2008.c: New test case.
* gcc.target/mips/nanf-legacy.c: New test case.
* gcc.target/mips/nans-2008.c: New test case.
* gcc.target/mips/nans-legacy.c: New test case.
* gcc.target/mips/nansf-2008.c: New test case.
* gcc.target/mips/nansf-legacy.c: New test case.
* gcc.target/mips/mips.exp: Handle `-mabs=' and `-mnan='.
From-SVN: r201313
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/install.texi | 18 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 45 |
2 files changed, 62 insertions, 1 deletions
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index e05cbed..9e5ba5e 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -1221,6 +1221,24 @@ ISA for floating-point arithmetics. You can select either @samp{sse} which enables @option{-msse2} or @samp{avx} which enables @option{-mavx} by default. This option is only supported on i386 and x86-64 targets. +@item --with-nan=@var{encoding} +On MIPS targets, set the default encoding convention to use for the +special not-a-number (NaN) IEEE 754 floating-point data. The +possibilities for @var{encoding} are: +@table @code +@item legacy +Use the legacy encoding, as with the @option{-mnan=legacy} command-line +option. +@item 2008 +Use the 754-2008 encoding, as with the @option{-mnan=2008} command-line +option. +@end table +To use this configuration option you must have an assembler version +installed that supports the @option{-mnan=} command-line option too. +In the absence of this configuration option the default convention is +the legacy encoding, as when neither of the @option{-mnan=2008} and +@option{-mnan=legacy} command-line options has been used. + @item --with-divide=@var{type} Specify how the compiler should generate code for checking for division by zero. This option is only supported on the MIPS target. diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 4457809..92cc250 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -750,7 +750,8 @@ Objective-C and Objective-C++ Dialects}. -mabi=@var{abi} -mabicalls -mno-abicalls @gol -mshared -mno-shared -mplt -mno-plt -mxgot -mno-xgot @gol -mgp32 -mgp64 -mfp32 -mfp64 -mhard-float -msoft-float @gol --mno-float -msingle-float -mdouble-float @gol +-mno-float -msingle-float -mdouble-float @gol +-mabs=@var{mode} -mnan=@var{encoding} @gol -mdsp -mno-dsp -mdspr2 -mno-dspr2 @gol -mmcu -mmno-mcu @gol -meva -mno-eva @gol @@ -16324,6 +16325,48 @@ operations. Assume that the floating-point coprocessor supports double-precision operations. This is the default. +@item -mabs=2008 +@itemx -mabs=legacy +@opindex mabs=2008 +@opindex mabs=legacy +These options control the treatment of the special not-a-number (NaN) +IEEE 754 floating-point data with the @code{abs.@i{fmt}} and +@code{neg.@i{fmt}} machine instructions. + +By default or when the @option{-mabs=legacy} is used the legacy +treatment is selected. In this case these instructions are considered +arithmetic and avoided where correct operation is required and the +input operand might be a NaN. A longer sequence of instructions that +manipulate the sign bit of floating-point datum manually is used +instead unless the @option{-ffinite-math-only} option has also been +specified. + +The @option{-mabs=2008} option selects the IEEE 754-2008 treatment. In +this case these instructions are considered non-arithmetic and therefore +operating correctly in all cases, including in particular where the +input operand is a NaN. These instructions are therefore always used +for the respective operations. + +@item -mnan=2008 +@itemx -mnan=legacy +@opindex mnan=2008 +@opindex mnan=legacy +These options control the encoding of the special not-a-number (NaN) +IEEE 754 floating-point data. + +The @option{-mnan=legacy} option selects the legacy encoding. In this +case quiet NaNs (qNaNs) are denoted by the first bit of their trailing +significand field being 0, whereas signalling NaNs (sNaNs) are denoted +by the first bit of their trailing significand field being 1. + +The @option{-mnan=2008} option selects the IEEE 754-2008 encoding. In +this case qNaNs are denoted by the first bit of their trailing +significand field being 1, whereas sNaNs are denoted by the first bit of +their trailing significand field being 0. + +The default is @option{-mnan=legacy} unless GCC has been configured with +@option{--with-nan=2008}. + @item -mllsc @itemx -mno-llsc @opindex mllsc |