We also enabled ZCX in the Ada compiler for the ARM port of VxWorks (but, 
unlike the Linux port, it works because it uses DWARF2 EH instead of EHABI) 
and this made the ACATS stack checking test cb1010c fail at -O2, because the 
scheduler moves an update of the stack pointer ahead of a stack probe.

Fixed thusly, tested on x86_64-suse-linux, applied on the mainline.


2014-04-04  Eric Botcazou  <ebotca...@adacore.com>

        * explow.c (probe_stack_range): Emit a final optimization blockage.


-- 
Eric Botcazou
Index: explow.c
===================================================================
--- explow.c	(revision 209068)
+++ explow.c	(working copy)
@@ -1729,6 +1729,9 @@ probe_stack_range (HOST_WIDE_INT first,
 	  emit_stack_probe (addr);
 	}
     }
+
+  /* Make sure nothing is scheduled before we are done.  */
+  emit_insn (gen_blockage ());
 }
 
 /* Adjust the stack pointer by minus SIZE (an rtx for a number of bytes)

Reply via email to