This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RX: 4.6 branch: Obvious fixes
- From: Nick Clifton <nickc at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 12 May 2011 10:44:55 +0100
- Subject: RX: 4.6 branch: Obvious fixes
Hi Guys,
I am applying the patch below to the RX backend on the 4.6 branch. It
fixes several small, obvious bugs, as described in the changelog.
Cheers
Nick
gcc/ChangeLog
2011-05-12 Nick Clifton <nickc@redhat.com>
* config/rx/rx.h (HAVE_PRE_DECREMENT): Fix typo.
* config/rx/rx.c (rx_is_legitimate_constant): Use gcc_unreachable
instead of abort.
(rx_align_for_label): Test label before extracting its number of
uses.
(rx_max_skip_for_label): Ignore debug insns.
Index: gcc/config/rx/rx.h
===================================================================
--- gcc/config/rx/rx.h (revision 173693)
+++ gcc/config/rx/rx.h (working copy)
@@ -155,7 +155,7 @@
#define LEGITIMATE_CONSTANT_P(X) rx_is_legitimate_constant (X)
-#define HAVE_PRE_DECCREMENT 1
+#define HAVE_PRE_DECREMENT 1
#define HAVE_POST_INCREMENT 1
#define MOVE_RATIO(SPEED) ((SPEED) ? 4 : 2)
Index: gcc/config/rx/rx.c
===================================================================
--- gcc/config/rx/rx.c (revision 173693)
+++ gcc/config/rx/rx.c (working copy)
@@ -2451,8 +2451,7 @@
default:
/* FIXME: Can this ever happen ? */
- abort ();
- return false;
+ gcc_unreachable ();
}
break;
@@ -2758,7 +2757,7 @@
because the delay due to the inserted NOPs would be greater than the delay
due to the misaligned branch. If uses_threshold is zero then the alignment
is always useful. */
- if (LABEL_NUSES (lab) < uses_threshold)
+ if (LABEL_P (lab) && LABEL_NUSES (lab) < uses_threshold)
return 0;
return optimize_size ? 1 : 3;
@@ -2775,7 +2774,7 @@
op = lab;
do
{
- op = next_nonnote_insn (op);
+ op = next_nonnote_nondebug_insn (op);
}
while (op && (LABEL_P (op)
|| (INSN_P (op) && GET_CODE (PATTERN (op)) == USE)));