Fix gcc codegen bug that manifests during generation of stack

protector code for sh3.  Details in gcc pr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32163

Author: kkojima
Date: Sun Jun  3 04:38:52 2007
New Revision: 125292

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125292
Log:
        PR target/32163
        * config/sh/sh.md (symGOT_load): Don't schedule insns when
        the symbol is generated with the stack protector.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sh/sh.md
This commit is contained in:
uwe 2007-06-03 21:02:44 +00:00
parent b419ee7e97
commit 86fd3cca3a
3 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-06-03 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/32163
* config/sh/sh.md (symGOT_load): Don't schedule insns when
the symbol is generated with the stack protector.
2007-01-09 Nicolas Pitre <nico@cam.org> 2007-01-09 Nicolas Pitre <nico@cam.org>
PR target/30173 PR target/30173

View File

@ -8283,6 +8283,20 @@ label:
operands[2], operands[2],
gen_rtx_REG (Pmode, PIC_REG))); gen_rtx_REG (Pmode, PIC_REG)));
/* When stack protector inserts codes after the result is set to
R0, @(rX, r12) will cause a spill failure for R0. Don't schedule
insns to avoid combining (set A (plus rX r12)) and (set op0 (mem A))
when rX is a GOT address for the guard symbol. Ugly but doesn't
matter because this is a rare situation. */
if (!TARGET_SHMEDIA
&& flag_stack_protect
&& GET_CODE (operands[1]) == CONST
&& GET_CODE (XEXP (operands[1], 0)) == UNSPEC
&& 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_blockage ());
/* N.B. This is not constant for a GOTPLT relocation. */ /* N.B. This is not constant for a GOTPLT relocation. */
mem = gen_rtx_MEM (Pmode, operands[3]); mem = gen_rtx_MEM (Pmode, operands[3]);
MEM_NOTRAP_P (mem) = 1; MEM_NOTRAP_P (mem) = 1;

View File

@ -8,7 +8,7 @@
in parentheses. You may also wish to include a number indicating in parentheses. You may also wish to include a number indicating
the revision of your modified compiler. */ the revision of your modified compiler. */
#define VERSUFFIX " (NetBSD nb1 20070110)" #define VERSUFFIX " (NetBSD nb1 20070603)"
/* This is the location of the online document giving instructions for /* This is the location of the online document giving instructions for
reporting bugs. If you distribute a modified version of GCC, reporting bugs. If you distribute a modified version of GCC,