This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Improve stack checking on PowerPC


>         * config/rs6000/rs6000.md (UNSPEC_PROBE_STACK): New constant.
>         (probe_stack): New insn.

Using an enclosing UNSPEC doesn't really work for a "store" insn, as revealed 
on PowerPC64 where you get ICEs in store_data_bypass_p at -O2, so I've turned 
it into a SET with the UNSPEC on the RHS.

Tested on powerpc-linux-gnu, applied on the mainline as obvious.


2009-12-15  Eric Botcazou  <ebotcazou@adacore.com>

	* config/rs6000/rs6000.md (probe_stack): Use an enclosing SET.


-- 
Eric Botcazou
Index: config/rs6000/rs6000.md
===================================================================
--- config/rs6000/rs6000.md	(revision 155209)
+++ config/rs6000/rs6000.md	(working copy)
@@ -12552,7 +12552,8 @@ (define_insn "blockage"
   "")
 
 (define_insn "probe_stack"
-  [(unspec [(match_operand 0 "memory_operand" "=m")] UNSPEC_PROBE_STACK)]
+  [(set (match_operand 0 "memory_operand" "=m")
+        (unspec [(const_int 0)] UNSPEC_PROBE_STACK))]
   ""
   "{st%U0%X0|stw%U0%X0} 0,%0"
   [(set_attr "type" "store")

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]