Re: [rs6000] Fix PR target/50091

2011-09-18 Thread David Edelsohn
Tested on PowerPC/Darwin by Iain and on PowerPC/Linux by me.  OK for mainline
and the 4.6/4.5 branches?


2011-09-06  Eric Botcazou  
Iain Sandoe  

PR target/50091
* config/rs6000/rs6000.md (probe_stack): Use explicit operand.
* config/rs6000/rs6000.c (output_probe_stack_range): Likewise.


Okay everywhere.

Thanks, David


Re: [rs6000] Fix PR target/50091

2011-09-17 Thread Eric Botcazou
> Tested on PowerPC/Darwin by Iain and on PowerPC/Linux by me.  OK for
> mainline and the 4.6/4.5 branches?
>
>
> 2011-09-06  Eric Botcazou  
>   Iain Sandoe  
>
>   PR target/50091
>   * config/rs6000/rs6000.md (probe_stack): Use explicit operand.
>   * config/rs6000/rs6000.c (output_probe_stack_range): Likewise.

Ping for the patch: http://gcc.gnu.org/ml/gcc-patches/2011-09/msg00361.html

Thanks in advance.

-- 
Eric Botcazou


[rs6000] Fix PR target/50091

2011-09-06 Thread Eric Botcazou
Hi,

this is a regression present on the mainline/4.6/4.5 branches.  I overlooked 
the -mregnames business when I changed the probe_stack pattern and, while 
this silently works on most platforms, this breaks on Darwin because of the 
awkward assembler.

Tested on PowerPC/Darwin by Iain and on PowerPC/Linux by me.  OK for mainline 
and the 4.6/4.5 branches?


2011-09-06  Eric Botcazou  
Iain Sandoe  

PR target/50091
* config/rs6000/rs6000.md (probe_stack): Use explicit operand.
* config/rs6000/rs6000.c (output_probe_stack_range): Likewise.


-- 
Eric Botcazou
Index: config/rs6000/rs6000.c
===
--- config/rs6000/rs6000.c	(revision 178488)
+++ config/rs6000/rs6000.c	(working copy)
@@ -19303,7 +19303,8 @@ output_probe_stack_range (rtx reg1, rtx
   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);
Index: config/rs6000/rs6000.md
===
--- config/rs6000/rs6000.md	(revision 178488)
+++ config/rs6000/rs6000.md	(working copy)
@@ -13049,7 +13049,11 @@ (define_insn "probe_stack"
   [(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")])