This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

[Bug target/65249] unable to find a register to spill in class 'R0_REGS' when compiling protobuf on sh4


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65249

--- Comment #10 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
On second thought, we could fix this with an adhoc way.
I'm testing the following patch for 4.9.

diff --git a/config/sh/sh.md b/config/sh/sh.md
index d957e55..93fd84e 100644
--- a/config/sh/sh.md
+++ b/config/sh/sh.md
@@ -10274,7 +10202,10 @@ label:
       && GET_CODE (XVECEXP (XEXP (operands[1], 0), 0, 0)) == SYMBOL_REF
       && strcmp (XSTR (XVECEXP (XEXP (operands[1], 0), 0, 0), 0),
          "__stack_chk_guard") == 0)
-    emit_insn (gen_chk_guard_add (operands[3], operands[2]));
+    {
+      emit_barrier ();
+      emit_insn (gen_chk_guard_add (operands[3], operands[2]));
+    }
   else
     emit_move_insn (operands[3], gen_rtx_PLUS (Pmode, operands[2],
                            gen_rtx_REG (Pmode, PIC_REG)));


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