diff mbox

Fix negation in stack_protect_test docs. Heads-up: prediction bug

Message ID 201205210422.q4L4MTDt001124@ignucius.se.axis.com
State New
Headers show

Commit Message

Hans-Peter Nilsson May 21, 2012, 4:22 a.m. UTC
The label is for branching *around* a block calling a noreturn
function.  See also the open-coded version which calls
emit_cmp_and_jump_insns with EQ.  All ports defining it seem ok.
They'd notice very quickly, no code compiled with
-fstack-protector code requiring stack-protection would work.

Also, there's a corresponding bug in the prediction set in
function.c:stack_protect_epilogue; the predction is set as per
the documentation.  However, I can't see how to fix it, as there
doesn't seem to be any predict.def value for the opposite, to
fix parameters in the predict_insn_def call, i.e. to "branch
around a basic block calling a noreturn function; predict as
taken".  Help?

I'll install this patch as obvious.

gcc:
	* doc/md.texi (stack_protect_test): Remove negation of
	branch to label.


brgds, H-P
diff mbox

Patch

Index: doc/md.texi
===================================================================
--- doc/md.texi	(revision 187558)
+++ doc/md.texi	(working copy)
@@ -6136,7 +6136,7 @@  If this pattern is not defined, then a p
 This pattern, if defined, compares a @code{ptr_mode} value from the
 memory in operand 1 with the memory in operand 0 without leaving the
 value in a register afterward and branches to operand 2 if the values
-weren't equal.
+were equal.
 
 If this pattern is not defined, then a plain compare pattern and
 conditional branch pattern is used.