This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fixing cris-* breakage (was: Minor mudflap fallout)

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

Index: gcc/config/cris/cris.c
--- 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);
   expand_builtin_trap ();
   emit_label (ok_label);
brgds, H-P

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]