aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-09-18 22:00:52 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-09-18 22:00:52 +0000
commit3903f804302c66b3e06238799577a36cfe403a42 (patch)
tree6bbc4c576014143611b0cbd0aedb5e2f20c1f765 /gcc
parente0cdd8d4c204592661f161e9be8009355488c46f (diff)
downloadgcc-3903f804302c66b3e06238799577a36cfe403a42.zip
gcc-3903f804302c66b3e06238799577a36cfe403a42.tar.gz
gcc-3903f804302c66b3e06238799577a36cfe403a42.tar.bz2
re PR target/50091 (-fstack-check generates wrong assembly)
PR target/50091 * config/rs6000/rs6000.md (probe_stack): Use explicit operand. * config/rs6000/rs6000.c (output_probe_stack_range): Likewise. Co-Authored-By: Iain Sandoe <developer@sandoe-acoustics.co.uk> From-SVN: r178944
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/rs6000/rs6000.c3
-rw-r--r--gcc/config/rs6000/rs6000.md6
3 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 461840f..a7c7279 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2011-09-18 Eric Botcazou <ebotcazou@adacore.com>
+ Iain Sandoe <developer@sandoe-acoustics.co.uk>
+
+ PR target/50091
+ * config/rs6000/rs6000.md (probe_stack): Use explicit operand.
+ * config/rs6000/rs6000.c (output_probe_stack_range): Likewise.
+
2011-09-18 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/bmiintrin.h: Remove tmp.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 1ab57e5..63c0f0c 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -19303,7 +19303,8 @@ output_probe_stack_range (rtx reg1, rtx reg2)
output_asm_insn ("{cal %0,%1(%0)|addi %0,%0,%1}", xops);
/* Probe at TEST_ADDR and branch. */
- output_asm_insn ("{st|stw} 0,0(%0)", xops);
+ xops[1] = gen_rtx_REG (Pmode, 0);
+ output_asm_insn ("{st|stw} %1,0(%0)", xops);
fprintf (asm_out_file, "\tb ");
assemble_name_raw (asm_out_file, loop_lab);
fputc ('\n', asm_out_file);
diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 818456f..3db67a53 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -13049,7 +13049,11 @@
[(set (match_operand 0 "memory_operand" "=m")
(unspec [(const_int 0)] UNSPEC_PROBE_STACK))]
""
- "{st%U0%X0|stw%U0%X0} 0,%0"
+ "*
+{
+ operands[1] = gen_rtx_REG (Pmode, 0);
+ return \"{st%U0%X0|stw%U0%X0} %1,%0\";
+}"
[(set_attr "type" "store")
(set_attr "length" "4")])