diff options
author | Oleg Endo <olegendo@gcc.gnu.org> | 2013-03-06 00:41:25 +0000 |
---|---|---|
committer | Oleg Endo <olegendo@gcc.gnu.org> | 2013-03-06 00:41:25 +0000 |
commit | 22d14e956c82c1d10ecf42512dfa3960f2bbb9a8 (patch) | |
tree | 35b525cb1796949ce2d7f1ab6707d25bbbf5116e /gcc/doc | |
parent | a9fbd45719578f61dac1c6f7719090f890c89cf8 (diff) |
PR target/56529
* config/sh/sh.c (sh_option_override): Check for TARGET_DYNSHIFT
instead of TARGET_SH2 for call-table case. Do not set sh_div_strategy
to SH_DIV_CALL_TABLE for TARGET_SH2.
* config.gcc (sh_multilibs): Add m2 and m2a to sh*-*-linux* multilib
list.
* doc/invoke.texi (SH options): Document mdiv= call-div1, call-fp,
call-table options.
PR target/56529
* config/sh/lib1funcs.S (udivsi3_i4i, sdivsi3_i4i): Add __SH2A__ to
inclusion list.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@196484 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index a2a40660cfe..11c34d8781b 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -18749,8 +18749,8 @@ Set the cost to assume for a multiply insn. @item -mdiv=@var{strategy} @opindex mdiv=@var{strategy} -Set the division strategy to use for SHmedia code. @var{strategy} must be -one of: +Set the division strategy to be used for integer division operations. +For SHmedia @var{strategy} can be one of: @table @samp @@ -18808,6 +18808,36 @@ a small dividend to be unlikely, and @samp{inv20l} assumes it to be likely. @end table +For targets other than SHmedia @var{strategy} can be one of: + +@table @samp + +@item call-div1 +Calls a library function that uses the single-step division instruction +@code{div1} to perform the operation. Division by zero calculates an +unspecified result and does not trap. This is the default except for SH4, +SH2A and SHcompact. + +@item call-fp +Calls a library function that performs the operation in double precision +floating point. Division by zero causes a floating-point exception. This is +the default for SHcompact with FPU. Specifying this for targets that do not +have a double precision FPU will default to @code{call-div1}. + +@item call-table +Calls a library function that uses a lookup table for small divisors and +the @code{div1} instruction with case distinction for larger divisors. Division +by zero calculates an unspecified result and does not trap. This is the default +for SH4. Specifying this for targets that do not have dynamic shift +instructions will default to @code{call-div1}. + +@end table + +When a division strategy has not been specified the default strategy will be +selected based on the current target. For SH2A the default strategy is to +use the @code{divs} and @code{divu} instructions instead of library function +calls. + @item -maccumulate-outgoing-args @opindex maccumulate-outgoing-args Reserve space once for outgoing arguments in the function prologue rather |