diff options
| author | kkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-03 04:38:52 +0000 |
|---|---|---|
| committer | kkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-03 04:38:52 +0000 |
| commit | 87a96196da33506b9886d278f7cefb716d3bbf76 (patch) | |
| tree | 970266bbd98f540f4cf9c254578f7d68633ae244 /gcc | |
| parent | 299684360404bd49fcdf57a112a784c9ad578464 (diff) | |
| download | ppe42-gcc-87a96196da33506b9886d278f7cefb716d3bbf76.tar.gz ppe42-gcc-87a96196da33506b9886d278f7cefb716d3bbf76.zip | |
PR target/32163
* config/sh/sh.md (symGOT_load): Don't schedule insns when
the symbol is generated with the stack protector.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125292 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/config/sh/sh.md | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f671396097..c1b2d93c518 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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-06-03 Kazu Hirata <kazu@codesourcery.com> * config/m68k/m68k.c (m68k_attribute_table): Add "interrupt". diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 2c81792ee27..9cc42b4f6fb 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -8502,6 +8502,20 @@ label: operands[2], 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. */ mem = gen_rtx_MEM (Pmode, operands[3]); MEM_NOTRAP_P (mem) = 1; |

