summaryrefslogtreecommitdiff
path: root/gcc/doc/install.texi
diff options
context:
space:
mode:
authordaney <daney@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-07 19:39:06 +0000
committerdaney <daney@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-07 19:39:06 +0000
commitf9262d1ebedf777c591ad1941365c24d173c9cea (patch)
treee327d4edd9f01ed94fe9589e1ab018e6777aba69 /gcc/doc/install.texi
parentf50b5bd06cce53a0511bb13cf1f8072f6a6b9afc (diff)
downloadgcc-f9262d1ebedf777c591ad1941365c24d173c9cea.tar.gz
2004-09-07 David Daney <ddaney@avtrex.com>
* config.gcc: Added support for --with-divide=[breaks|traps] for mips targets. * config/mips/mips.h (MASK_DIVIDE_BREAKS): New target_flags bit. (TARGET_DIVIDE_TRAPS): New macro. (TARGET_SWITCHES): Added -mdivide-traps and -mdivide-breaks. (OPTION_DEFAULT_SPECS): Added --with-divide= support. * config/mips/mips.c (mips_idiv_insns): Generate proper count on GENERATE_DIVIDE_TRAPS. (mips_output_division): Emit conditional trap if GENERATE_DIVIDE_TRAPS is set. * doc/install.texi: Document --with-divide. * doc/invoke.texi: Document -mdivide-traps and -mdivide-breaks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87153 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc/install.texi')
-rw-r--r--gcc/doc/install.texi22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index dfad815d49a..01cbb47c25b 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -959,6 +959,18 @@ options and for @option{-mhard-float} or @option{-msoft-float}. As with
@option{--with-cpu}, which switches will be accepted and acceptable values
of the arguments depend on the target.
+@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.
+The possibilities for @var{type} are:
+@table @code
+@item traps
+Division by zero checks use conditional traps (this is the default on
+systems that support conditional traps).
+@item breaks
+Division by zero checks use the break instruction.
+@end table
+
@item --enable-altivec
Specify that the target supports AltiVec vector enhancements. This
option will adjust the ABI for AltiVec enhancements, as well as generate
@@ -3201,6 +3213,16 @@ configure for @samp{mipsel-elf} as a workaround. The
@samp{mips*-*-linux*} target continues to use the MIPS II routines. More
work on this is expected in future releases.
+MIPS systems check for division by zero (unless
+@option{-mno-check-zero-division} is passed to the compiler) by
+generating either a conditional trap or a break instruction. Using
+trap results in smaller code, but is only supported on MIPS II and
+later. Also, some versions of the Linux kernel have a bug that
+prevents trap from generating the proper signal (SIGFPE). To enable
+the use of break, use the @option{--with-divide=breaks}
+@command{configure} option when configuring GCC. The default is to
+use traps on systems that support them.
+
Cross-compilers for the Mips as target using the Mips assembler
currently do not work, because the auxiliary programs
@file{mips-tdump.c} and @file{mips-tfile.c} can't be compiled on