This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/65249] unable to find a register to spill in class 'R0_REGS' when compiling protobuf on sh4
- From: "kkojima at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 01 Mar 2015 13:43:52 +0000
- Subject: [Bug target/65249] unable to find a register to spill in class 'R0_REGS' when compiling protobuf on sh4
- Auto-submitted: auto-generated
- References: <bug-65249-4 at http dot gcc dot gnu dot org/bugzilla/>
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)));