aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSofiane Naci <sofiane.naci@arm.com>2013-03-12 17:06:10 +0000
committerSofiane Naci <sofiane.naci@arm.com>2013-03-12 17:06:10 +0000
commit5ebfbdb135a4adbac407a8b7348d644f760fae7e (patch)
treec8b3340bf767f2035efe2085651cdbcbbef3ad82
parentb75ae9ada0377ba4413e31b028d2a2780c31f1f1 (diff)
Merge from gcc-4_7-branch 196364:196530.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/ARM/aarch64-4.7-branch@196616 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog40
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/config.gcc16
-rw-r--r--gcc/config/sh/sh.c5
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/tree.c3
-rw-r--r--gcc/doc/invoke.texi91
-rw-r--r--gcc/gimple-low.c16
-rw-r--r--gcc/testsuite/ChangeLog14
-rw-r--r--gcc/testsuite/g++.dg/template/typename20.C11
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55481.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56488.c31
-rw-r--r--gcc/tree-ssa-loop-ivopts.c42
-rw-r--r--libgcc/ChangeLog15
-rw-r--r--libgcc/config.host12
-rw-r--r--libgcc/config/sh/lib1funcs.S4
16 files changed, 244 insertions, 79 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 438172f6cd8..73651dd22dd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,43 @@
+2013-03-06 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport from mainline
+ 2013-03-06 Oleg Endo <olegendo@gcc.gnu.org>
+
+ 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): Use table for mdiv= option. Document
+ mdiv= call-div1, call-fp, call-table options.
+
+2013-03-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * config.gcc (arm*-*-rtemself*): New.
+ (arm*-*-rtems*): Removed.
+ (arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*): Rename
+ "arm*-*-rtemseabi*" to "arm*-*-rtems*".
+
+2013-03-01 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-12-12 Zdenek Dvorak <ook@ucw.cz>
+
+ PR tree-optimization/55481
+ * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Fall
+ back to general rewriting if we cannot leave an original biv
+ definition alone.
+
+2013-03-01 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-04-10 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52888
+ * gimple-low.c (gimple_check_call_args): Properly account for
+ compatible aggregate types.
+
2013-02-26 Nick Clifton <nickc@redhat.com>
PR target/56453
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 7f5915e3bd3..1b07c9acf1d 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20130301
+20130308
diff --git a/gcc/config.gcc b/gcc/config.gcc
index c41fddc4db3..e9ffb85ae43 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -257,7 +257,7 @@ case ${target} in
| arm*-*-elf \
| arm*-*-freebsd* \
| arm*-*-linux* \
- | arm*-*-rtems* \
+ | arm*-*-rtemself* \
| arm*-*-uclinux* \
| arm*-wince-pe* \
| mips-sgi-irix6.5 \
@@ -926,7 +926,11 @@ arm*-*-ecos-elf)
tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
tmake_file="arm/t-arm arm/t-arm-elf"
;;
-arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*)
+arm*-*-rtemself*)
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h newlib-stdint.h"
+ tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
+ ;;
+arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
# The BPABI long long divmod functions return a 128-bit value in
# registers r0-r3. Correctly modeling that requires the use of
# TImode.
@@ -940,7 +944,7 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*)
tmake_file="${tmake_file} arm/t-bpabi"
use_gcc_stdint=wrap
;;
- arm*-*-rtemseabi*)
+ arm*-*-rtems*)
tm_file="${tm_file} rtems.h arm/rtems-eabi.h newlib-stdint.h"
tmake_file="${tmake_file} arm/t-bpabi t-rtems arm/t-rtems-eabi"
;;
@@ -953,10 +957,6 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*)
esac
tm_file="${tm_file} arm/aout.h arm/arm.h"
;;
-arm*-*-rtems*)
- tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h newlib-stdint.h"
- tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
- ;;
arm*-*-elf)
tm_file="dbxelf.h elfos.h newlib-stdint.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
tmake_file="arm/t-arm arm/t-arm-elf"
@@ -2379,7 +2379,7 @@ sh-*-elf* | sh[12346l]*-*-elf* | \
sh[1234]*) sh_multilibs=${sh_cpu_target} ;;
sh64* | sh5*) sh_multilibs=m5-32media,m5-32media-nofpu,m5-compact,m5-compact-nofpu,m5-64media,m5-64media-nofpu ;;
sh-superh-*) sh_multilibs=m4,m4-single,m4-single-only,m4-nofpu ;;
- sh*-*-linux*) sh_multilibs=m1,m3e,m4 ;;
+ sh*-*-linux*) sh_multilibs=m1,m2,m2a,m3e,m4 ;;
sh*-*-netbsd*) sh_multilibs=m3,m3e,m4 ;;
*) sh_multilibs=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single ;;
esac
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index f828ed49721..1c1ab62cd1e 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -686,7 +686,8 @@ sh_option_override (void)
|| (TARGET_HARD_SH4 && TARGET_SH2E)
|| (TARGET_SHCOMPACT && TARGET_FPU_ANY)))
sh_div_strategy = SH_DIV_CALL_FP;
- else if (! strcmp (sh_div_str, "call-table") && TARGET_SH2)
+ else if (! strcmp (sh_div_str, "call-table")
+ && (TARGET_SH3 || TARGET_SH2A))
sh_div_strategy = SH_DIV_CALL_TABLE;
else
/* Pick one that makes most sense for the target in general.
@@ -706,8 +707,6 @@ sh_option_override (void)
sh_div_strategy = SH_DIV_CALL_FP;
/* SH1 .. SH3 cores often go into small-footprint systems, so
default to the smallest implementation available. */
- else if (TARGET_SH2) /* ??? EXPERIMENTAL */
- sh_div_strategy = SH_DIV_CALL_TABLE;
else
sh_div_strategy = SH_DIV_CALL_DIV1;
}
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 4f342c5e33c..3c6c818aebc 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56543
+ * tree.c (strip_typedefs): Don't copy args if they are NULL.
+
2013-02-22 Jason Merrill <jason@redhat.com>
PR c++/40405
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 8909c72bb8c..b4a538645da 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1209,7 +1209,8 @@ strip_typedefs (tree t)
case TYPENAME_TYPE:
{
tree fullname = TYPENAME_TYPE_FULLNAME (t);
- if (TREE_CODE (fullname) == TEMPLATE_ID_EXPR)
+ if (TREE_CODE (fullname) == TEMPLATE_ID_EXPR
+ && TREE_OPERAND (fullname, 1))
{
tree args = TREE_OPERAND (fullname, 1);
tree new_args = copy_node (args);
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 42c1df74d99..08b464b8859 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -18190,43 +18190,94 @@ 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: call, call2, fp, inv, inv:minlat, inv20u, inv20l, inv:call,
-inv:call2, inv:fp .
-"fp" performs the operation in floating point. This has a very high latency,
+Set the division strategy to be used for integer division operations.
+For SHmedia @var{strategy} can be one of:
+
+@table @samp
+
+@item fp
+Performs the operation in floating point. This has a very high latency,
but needs only a few instructions, so it might be a good choice if
your code has enough easily-exploitable ILP to allow the compiler to
schedule the floating-point instructions together with other instructions.
Division by zero causes a floating-point exception.
-"inv" uses integer operations to calculate the inverse of the divisor,
+
+@item inv
+Uses integer operations to calculate the inverse of the divisor,
and then multiplies the dividend with the inverse. This strategy allows
-cse and hoisting of the inverse calculation. Division by zero calculates
+CSE and hoisting of the inverse calculation. Division by zero calculates
an unspecified result, but does not trap.
-"inv:minlat" is a variant of "inv" where if no cse / hoisting opportunities
+
+@item inv:minlat
+A variant of @samp{inv} where, if no CSE or hoisting opportunities
have been found, or if the entire operation has been hoisted to the same
place, the last stages of the inverse calculation are intertwined with the
final multiply to reduce the overall latency, at the expense of using a few
more instructions, and thus offering fewer scheduling opportunities with
other code.
-"call" calls a library function that usually implements the inv:minlat
+
+@item call
+Calls a library function that usually implements the @samp{inv:minlat}
strategy.
-This gives high code density for m5-*media-nofpu compilations.
-"call2" uses a different entry point of the same library function, where it
+This gives high code density for @code{m5-*media-nofpu} compilations.
+
+@item call2
+Uses a different entry point of the same library function, where it
assumes that a pointer to a lookup table has already been set up, which
-exposes the pointer load to cse / code hoisting optimizations.
-"inv:call", "inv:call2" and "inv:fp" all use the "inv" algorithm for initial
-code generation, but if the code stays unoptimized, revert to the "call",
-"call2", or "fp" strategies, respectively. Note that the
+exposes the pointer load to CSE and code hoisting optimizations.
+
+@item inv:call
+@itemx inv:call2
+@itemx inv:fp
+Use the @samp{inv} algorithm for initial
+code generation, but if the code stays unoptimized, revert to the @samp{call},
+@samp{call2}, or @samp{fp} strategies, respectively. Note that the
potentially-trapping side effect of division by zero is carried by a
separate instruction, so it is possible that all the integer instructions
are hoisted out, but the marker for the side effect stays where it is.
-A recombination to fp operations or a call is not possible in that case.
-"inv20u" and "inv20l" are variants of the "inv:minlat" strategy. In the case
-that the inverse calculation was nor separated from the multiply, they speed
-up division where the dividend fits into 20 bits (plus sign where applicable),
+A recombination to floating-point operations or a call is not possible
+in that case.
+
+@item inv20u
+@itemx inv20l
+Variants of the @samp{inv:minlat} strategy. In the case
+that the inverse calculation is not separated from the multiply, they speed
+up division where the dividend fits into 20 bits (plus sign where applicable)
by inserting a test to skip a number of operations in this case; this test
-slows down the case of larger dividends. inv20u assumes the case of a such
-a small dividend to be unlikely, and inv20l assumes it to be likely.
+slows down the case of larger dividends. @samp{inv20u} assumes the case of a such
+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
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index c3d41282e80..293d4d7b82b 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -241,15 +241,17 @@ gimple_check_call_args (gimple stmt, tree fndecl)
i < nargs;
i++, p = DECL_CHAIN (p))
{
+ tree arg;
/* We cannot distinguish a varargs function from the case
of excess parameters, still deferring the inlining decision
to the callee is possible. */
if (!p)
break;
+ arg = gimple_call_arg (stmt, i);
if (p == error_mark_node
- || gimple_call_arg (stmt, i) == error_mark_node
- || !fold_convertible_p (DECL_ARG_TYPE (p),
- gimple_call_arg (stmt, i)))
+ || arg == error_mark_node
+ || (!types_compatible_p (DECL_ARG_TYPE (p), TREE_TYPE (arg))
+ && !fold_convertible_p (DECL_ARG_TYPE (p), arg)))
return false;
}
}
@@ -257,15 +259,17 @@ gimple_check_call_args (gimple stmt, tree fndecl)
{
for (i = 0, p = parms; i < nargs; i++, p = TREE_CHAIN (p))
{
+ tree arg;
/* If this is a varargs function defer inlining decision
to callee. */
if (!p)
break;
+ arg = gimple_call_arg (stmt, i);
if (TREE_VALUE (p) == error_mark_node
- || gimple_call_arg (stmt, i) == error_mark_node
+ || arg == error_mark_node
|| TREE_CODE (TREE_VALUE (p)) == VOID_TYPE
- || !fold_convertible_p (TREE_VALUE (p),
- gimple_call_arg (stmt, i)))
+ || (!types_compatible_p (TREE_VALUE (p), TREE_TYPE (arg))
+ && !fold_convertible_p (TREE_VALUE (p), arg)))
return false;
}
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e25253a308e..ca8c8f011d0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,17 @@
+2013-03-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56543
+ * g++.dg/template/typename20.C: New test.
+
+2013-03-01 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2012-12-12 Zdenek Dvorak <ook@ucw.cz>
+
+ PR tree-optimization/55481
+ * gcc.dg/torture/pr55481.c: New testcase.
+ * gcc.dg/torture/pr56488.c: Likewise.
+
2013-02-26 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/56443
diff --git a/gcc/testsuite/g++.dg/template/typename20.C b/gcc/testsuite/g++.dg/template/typename20.C
new file mode 100644
index 00000000000..d5bd51f356d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/typename20.C
@@ -0,0 +1,11 @@
+// PR c++/56543
+
+template <typename>
+struct S;
+
+template <typename T>
+struct U
+{
+ typedef typename S <T>::template V <> W;
+ S <W> x;
+};
diff --git a/gcc/testsuite/gcc.dg/torture/pr55481.c b/gcc/testsuite/gcc.dg/torture/pr55481.c
new file mode 100644
index 00000000000..26ba9ff7d99
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55481.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+
+int main()
+{
+ signed char result = 0;
+ int n;
+ for (n = 0; n < 13; ++n)
+ {
+ int tem = result;
+ tem = tem + 31;
+ result = tem;
+ }
+ if (result != -109)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56488.c b/gcc/testsuite/gcc.dg/torture/pr56488.c
new file mode 100644
index 00000000000..78bac7bede7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56488.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+
+int a, c, d = 1;
+struct S { int s; } b, f;
+short e;
+
+static void
+foo (int x)
+{
+ int g[] = { };
+ for (e = 0; e != 1; e = e + 5)
+ {
+ int *h[1] = { &g[0] };
+ if (!x)
+ return;
+ f = b;
+ }
+}
+
+int
+main ()
+{
+ int i, j;
+ for (i = 0; i < 6; i++)
+ for (j = 8; j; j--)
+ a = 0;
+ foo (d);
+ while (c)
+ ;
+ return 0;
+}
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 10c9352599a..7556f53d3e4 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -6170,35 +6170,24 @@ rewrite_use_nonlinear_expr (struct ivopts_data *data,
if (cand->pos == IP_ORIGINAL
&& cand->incremented_at == use->stmt)
{
- tree step, ctype, utype;
- enum tree_code incr_code = PLUS_EXPR, old_code;
+ enum tree_code stmt_code;
gcc_assert (is_gimple_assign (use->stmt));
gcc_assert (gimple_assign_lhs (use->stmt) == cand->var_after);
- step = cand->iv->step;
- ctype = TREE_TYPE (step);
- utype = TREE_TYPE (cand->var_after);
- if (TREE_CODE (step) == NEGATE_EXPR)
- {
- incr_code = MINUS_EXPR;
- step = TREE_OPERAND (step, 0);
- }
-
/* Check whether we may leave the computation unchanged.
This is the case only if it does not rely on other
computations in the loop -- otherwise, the computation
we rely upon may be removed in remove_unused_ivs,
thus leading to ICE. */
- old_code = gimple_assign_rhs_code (use->stmt);
- if (old_code == PLUS_EXPR
- || old_code == MINUS_EXPR
- || old_code == POINTER_PLUS_EXPR)
+ stmt_code = gimple_assign_rhs_code (use->stmt);
+ if (stmt_code == PLUS_EXPR
+ || stmt_code == MINUS_EXPR
+ || stmt_code == POINTER_PLUS_EXPR)
{
if (gimple_assign_rhs1 (use->stmt) == cand->var_before)
op = gimple_assign_rhs2 (use->stmt);
- else if (old_code != MINUS_EXPR
- && gimple_assign_rhs2 (use->stmt) == cand->var_before)
+ else if (gimple_assign_rhs2 (use->stmt) == cand->var_before)
op = gimple_assign_rhs1 (use->stmt);
else
op = NULL_TREE;
@@ -6206,24 +6195,13 @@ rewrite_use_nonlinear_expr (struct ivopts_data *data,
else
op = NULL_TREE;
- if (op
- && (TREE_CODE (op) == INTEGER_CST
- || operand_equal_p (op, step, 0)))
+ if (op && expr_invariant_in_loop_p (data->current_loop, op))
return;
-
- /* Otherwise, add the necessary computations to express
- the iv. */
- op = fold_convert (ctype, cand->var_before);
- comp = fold_convert (utype,
- build2 (incr_code, ctype, op,
- unshare_expr (step)));
- }
- else
- {
- comp = get_computation (data->current_loop, use, cand);
- gcc_assert (comp != NULL_TREE);
}
+ comp = get_computation (data->current_loop, use, cand);
+ gcc_assert (comp != NULL_TREE);
+
switch (gimple_code (use->stmt))
{
case GIMPLE_PHI:
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 44222ea8b63..5cb273043e4 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,18 @@
+2013-03-06 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport from mainline.
+ 2013-03-06 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/56529
+ * config/sh/lib1funcs.S (udivsi3_i4i, sdivsi3_i4i): Add __SH2A__ to
+ inclusion list.
+
+2013-03-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * config.host (arm*-*-rtemself*): New.
+ (arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*): Rename
+ "arm*-*-rtemseabi*" to "arm*-*-rtems*".
+
2012-12-18 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org
Backport from mainline.
diff --git a/libgcc/config.host b/libgcc/config.host
index 2bd51590cbe..f19b49c3e88 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -367,11 +367,15 @@ arm*-*-ecos-elf)
tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
extra_parts="$extra_parts crti.o crtn.o"
;;
-arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*)
+arm*-*-rtemself*)
+ tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
+ extra_parts="$extra_parts crti.o crtn.o"
+ ;;
+arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems*)
tmake_file="${tmake_file} arm/t-arm arm/t-elf t-fixedpoint-gnu-prefix"
tm_file="$tm_file arm/bpabi-lib.h"
case ${host} in
- arm*-*-eabi* | arm*-*-rtemseabi*)
+ arm*-*-eabi* | arm*-*-rtems*)
tmake_file="${tmake_file} arm/t-bpabi"
extra_parts="crtbegin.o crtend.o crti.o crtn.o"
;;
@@ -384,10 +388,6 @@ arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtemseabi*)
tmake_file="$tmake_file t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
unwind_header=config/arm/unwind-arm.h
;;
-arm*-*-rtems*)
- tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
- extra_parts="$extra_parts crti.o crtn.o"
- ;;
arm*-*-elf)
tmake_file="$tmake_file arm/t-arm arm/t-elf t-softfp-sfdf t-softfp-excl arm/t-softfp t-softfp"
extra_parts="$extra_parts crti.o crtn.o"
diff --git a/libgcc/config/sh/lib1funcs.S b/libgcc/config/sh/lib1funcs.S
index 2f0ca16cd91..84a42e79901 100644
--- a/libgcc/config/sh/lib1funcs.S
+++ b/libgcc/config/sh/lib1funcs.S
@@ -3255,8 +3255,8 @@ GLOBAL(div_table):
.word 17136
.word 16639
-#elif defined (__SH3__) || defined (__SH3E__) || defined (__SH4__) || defined (__SH4_SINGLE__) || defined (__SH4_SINGLE_ONLY__) || defined (__SH4_NOFPU__)
-/* This code used shld, thus is not suitable for SH1 / SH2. */
+#elif defined (__SH2A__) || defined (__SH3__) || defined (__SH3E__) || defined (__SH4__) || defined (__SH4_SINGLE__) || defined (__SH4_SINGLE_ONLY__) || defined (__SH4_NOFPU__)
+/* This code uses shld, thus is not suitable for SH1 / SH2. */
/* Signed / unsigned division without use of FPU, optimized for SH4.
Uses a lookup table for divisors in the range -128 .. +128, and