This is the mail archive of the 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]

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

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.

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

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.

brgds, H-P

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