Commit 35a07c37 by Eric Botcazou Committed by Eric Botcazou

re PR target/10127 (-fstack-check let's program crash)

	PR target/10127
	PR ada/20548
	* config/i386/i386.md (probe_stack_range): New expander.
	(logical operation peepholes): Do not split stack checking probes.

From-SVN: r153918
parent 3e901069
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> 2009-11-04 Harsha Jagasia <harsha.jagasia@amd.com>
Dwarakanath Rajagopal <dwarak.rajagopal@amd.com> Dwarakanath Rajagopal <dwarak.rajagopal@amd.com>
...@@ -20023,6 +20023,18 @@ ...@@ -20023,6 +20023,18 @@
DONE; 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" (define_expand "builtin_setjmp_receiver"
[(label_ref (match_operand 0 "" ""))] [(label_ref (match_operand 0 "" ""))]
"!TARGET_64BIT && flag_pic" "!TARGET_64BIT && flag_pic"
...@@ -20526,7 +20538,9 @@ ...@@ -20526,7 +20538,9 @@
[(match_dup 0) [(match_dup 0)
(match_operand:SI 1 "nonmemory_operand" "")])) (match_operand:SI 1 "nonmemory_operand" "")]))
(clobber (reg:CC FLAGS_REG))])] (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)) [(set (match_dup 2) (match_dup 0))
(parallel [(set (match_dup 2) (parallel [(set (match_dup 2)
(match_op_dup 3 [(match_dup 2) (match_dup 1)])) (match_op_dup 3 [(match_dup 2) (match_dup 1)]))
...@@ -20541,7 +20555,9 @@ ...@@ -20541,7 +20555,9 @@
[(match_operand:SI 1 "nonmemory_operand" "") [(match_operand:SI 1 "nonmemory_operand" "")
(match_dup 0)])) (match_dup 0)]))
(clobber (reg:CC FLAGS_REG))])] (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)) [(set (match_dup 2) (match_dup 0))
(parallel [(set (match_dup 2) (parallel [(set (match_dup 2)
(match_op_dup 3 [(match_dup 1) (match_dup 2)])) (match_op_dup 3 [(match_dup 1) (match_dup 2)]))
......
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> 2009-11-04 Janus Weil <janus@gcc.gnu.org>
PR fortran/41556 PR fortran/41556
......
c52103x
c52104x
c52104y
cb1010a
cb1010c
cb1010d
templat templat
# Tests must be sorted in alphabetical order # Tests must be sorted in alphabetical order
# c52103x, c52104x, c52104y: -fstack-check doesn't work, PR middle-end/20548
# cb1010a, cb1010c, cb1010d: likewise
...@@ -52,4 +52,7 @@ echo exec gnatmake '"$@"' >> host_gnatmake ...@@ -52,4 +52,7 @@ echo exec gnatmake '"$@"' >> host_gnatmake
chmod +x host_gnatmake chmod +x host_gnatmake
# Limit the stack to 8MB for stack checking
ulimit -s 8192
exec $testdir/run_all.sh ${1+"$@"} exec $testdir/run_all.sh ${1+"$@"}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment