OSDN Git Service

PR target/10127
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 4 Nov 2009 21:45:54 +0000 (21:45 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 4 Nov 2009 21:45:54 +0000 (21:45 +0000)
PR ada/20548
* config/i386/i386.md (probe_stack_range): New expander.
(logical operation peepholes): Do not split stack checking probes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153918 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.md
gcc/testsuite/ChangeLog
gcc/testsuite/ada/acats/norun.lst
gcc/testsuite/ada/acats/run_acats

index 0ec0c60..0aed70c 100644 (file)
@@ -1,3 +1,10 @@
+2009-11-04  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR target/10127
+       PR ada/20548
+       * config/i386/i386.md (probe_stack_range): New expander.
+       (logical operation peepholes): Do not split stack checking probes.
+
 2009-11-04  Harsha Jagasia  <harsha.jagasia@amd.com>
            Dwarakanath Rajagopal  <dwarak.rajagopal@amd.com>
 
index c011d9b..82f5352 100644 (file)
   DONE;
 })
 
+;; Use IOR for stack probes, this is shorter.
+(define_expand "probe_stack"
+  [(match_operand 0 "memory_operand" "")]
+  ""
+{
+  if (GET_MODE (operands[0]) == DImode)
+    emit_insn (gen_iordi3 (operands[0], operands[0], const0_rtx));
+  else
+    emit_insn (gen_iorsi3 (operands[0], operands[0], const0_rtx));
+  DONE;
+})
+
 (define_expand "builtin_setjmp_receiver"
   [(label_ref (match_operand 0 "" ""))]
   "!TARGET_64BIT && flag_pic"
                      [(match_dup 0)
                       (match_operand:SI 1 "nonmemory_operand" "")]))
               (clobber (reg:CC FLAGS_REG))])]
-  "optimize_insn_for_speed_p () && ! TARGET_READ_MODIFY_WRITE"
+  "optimize_insn_for_speed_p () && ! TARGET_READ_MODIFY_WRITE
+   /* Do not split stack checking probes.  */
+   && GET_CODE (operands[3]) != IOR && operands[1] != const0_rtx"
   [(set (match_dup 2) (match_dup 0))
    (parallel [(set (match_dup 2)
                    (match_op_dup 3 [(match_dup 2) (match_dup 1)]))
                      [(match_operand:SI 1 "nonmemory_operand" "")
                       (match_dup 0)]))
               (clobber (reg:CC FLAGS_REG))])]
-  "optimize_insn_for_speed_p () && ! TARGET_READ_MODIFY_WRITE"
+  "optimize_insn_for_speed_p () && ! TARGET_READ_MODIFY_WRITE
+   /* Do not split stack checking probes.  */
+   && GET_CODE (operands[3]) != IOR && operands[1] != const0_rtx"
   [(set (match_dup 2) (match_dup 0))
    (parallel [(set (match_dup 2)
                    (match_op_dup 3 [(match_dup 1) (match_dup 2)]))
index 3066e3d..5f63688 100644 (file)
@@ -1,3 +1,9 @@
+2009-11-04  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR ada/20548
+       * ada/acats/norun.lst: Remove the stack checking tests.
+       * ada/acats/run_acats: Limit the stack to 8MB.
+
 2009-11-04  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/41556
index 8441024..c0b08e4 100644 (file)
@@ -1,10 +1,2 @@
-c52103x
-c52104x
-c52104y
-cb1010a
-cb1010c
-cb1010d
 templat
 # Tests must be sorted in alphabetical order
-# c52103x, c52104x, c52104y: -fstack-check doesn't work, PR middle-end/20548
-# cb1010a, cb1010c, cb1010d: likewise
index 05f3ff5..acb6ab5 100755 (executable)
@@ -52,4 +52,7 @@ echo exec gnatmake '"$@"' >> host_gnatmake
 
 chmod +x host_gnatmake
 
+# Limit the stack to 8MB for stack checking
+ulimit -s 8192
+
 exec $testdir/run_all.sh ${1+"$@"}