public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [rs6000] Fix PR target/50091
@ 2011-09-06  9:36 Eric Botcazou
  2011-09-17  9:39 ` Eric Botcazou
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Botcazou @ 2011-09-06  9:36 UTC (permalink / raw)
  To: gcc-patches; +Cc: Iain Sandoe

[-- Attachment #1: Type: text/plain, Size: 632 bytes --]

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  <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.


-- 
Eric Botcazou

[-- Attachment #2: pr50091-2.diff --]
[-- Type: text/x-diff, Size: 1136 bytes --]

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")])
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [rs6000] Fix PR target/50091
  2011-09-06  9:36 [rs6000] Fix PR target/50091 Eric Botcazou
@ 2011-09-17  9:39 ` Eric Botcazou
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Botcazou @ 2011-09-17  9:39 UTC (permalink / raw)
  To: gcc-patches; +Cc: Iain Sandoe, dje.gcc

> 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  <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.

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

Thanks in advance.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [rs6000] Fix PR target/50091
@ 2011-09-19  0:17 David Edelsohn
  0 siblings, 0 replies; 3+ messages in thread
From: David Edelsohn @ 2011-09-19  0:17 UTC (permalink / raw)
  To: Eric Botcazou; +Cc: GCC Patches

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  <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.


Okay everywhere.

Thanks, David

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-18 17:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-06  9:36 [rs6000] Fix PR target/50091 Eric Botcazou
2011-09-17  9:39 ` Eric Botcazou
2011-09-19  0:17 David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).