This is the mail archive of the
mailing list for the GCC project.
Fixing cris-* breakage (was: Minor mudflap fallout)
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 26 Oct 2013 13:44:31 -0400 (EDT)
- Subject: Fixing cris-* breakage (was: Minor mudflap fallout)
- Authentication-results: sourceware.org; auth=none
- References: <526B9876 dot 8060704 at redhat dot com> <alpine dot BSF dot 2 dot 02 dot 1310260939200 dot 31187 at arjuna dot pair dot com>
On Sat, 26 Oct 2013, Hans-Peter Nilsson wrote:
> Yeah, cris-elf is broken too. I use PRED_MUDFLAP in
> cris_emit_trap_for_misalignment, which should explain its use.
> Is there a replacement?
Actually looking at predict.def, I see PRED_COLD_LABEL, which
wasn't there when I worked with this code but which mostly
matches the need. Will commit the following after testing.
* config/cris/cris.c (cris_emit_trap_for_misalignment): Replace
removed PRED_MUDFLAP with PRED_COLD_LABEL.
--- gcc/config/cris/cris.c (revision 204094)
+++ gcc/config/cris/cris.c (working copy)
@@ -1996,10 +1996,10 @@ cris_emit_trap_for_misalignment (rtx mem
jmp = get_last_insn ();
gcc_assert (JUMP_P (jmp));
- /* While this isn't mudflap, it is a similar kind of assertion.
- If PRED_MUDFLAP stops working, use something else or introduce a
- more suitable assertion predication type. */
- predict_insn_def (jmp, PRED_MUDFLAP, TAKEN);
+ /* Actually, this is even less likely than a cold label; the program
+ will likely terminate. Replace with something like "almost
+ impossible" if such a prediction is introduced. */
+ predict_insn_def (jmp, PRED_COLD_LABEL, TAKEN);