This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[DOC-PATCH] Documentation fix for stack_protect_test


Hi all,

the documentation for stack_protect_test should be changed according to
the appended patch. The documentation says that if both values of
operands 0 and 1 are _not_ equal a branch to operand 2 should be done.
But this is not the case. A branch should be done if both values are
equal. The "not" should be removed.

For example:

        call    foo
        movl    $0, %eax
        movl    -8(%ebp), %edx
        xorl    %gs:20, %edx
        je      .L6
        call    __stack_chk_fail
.L6:
        addl    $68, %esp
        popl    %ecx
        popl    %ebp
        leal    -4(%ecx), %esp
        ret

A branch to label ".L6" (operand 2) should be done as long as both
values are equal.

Can someone confirm this?

Kind regards
Stefan
2008-11-24  Stefan Schulze Frielinghaus  <stefan@seekline.net>

	* doc/md.tex (stack_protect_test): If both values are equal
	a branch to operand 2 should be done.

Index: md.texi
===================================================================
--- md.texi	(revision 142159)
+++ md.texi	(working copy)
@@ -5210,7 +5210,7 @@
 This pattern, if defined, compares a @code{Pmode} 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.

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