diff options
Diffstat (limited to 'gcc/doc/md.texi')
-rw-r--r-- | gcc/doc/md.texi | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi index 6a3b76e..ed07a2f 100644 --- a/gcc/doc/md.texi +++ b/gcc/doc/md.texi @@ -4094,6 +4094,30 @@ released only after all previous memory operations have completed. If this pattern is not defined, then a @code{memory_barrier} pattern will be emitted, followed by a store of the value to the memory operand. +@cindex @code{stack_protect_set} instruction pattern +@item @samp{stack_protect_set} + +This pattern, if defined, moves a @code{Pmode} value from the memory +in operand 1 to the memory in operand 0 without leaving the value in +a register afterward. This is to avoid leaking the value some place +that an attacker might use to rewrite the stack guard slot after +having clobbered it. + +If this pattern is not defined, then a plain move pattern is generated. + +@cindex @code{stack_protect_test} instruction pattern +@item @samp{stack_protect_test} + +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. Further, it initializes the data +structures in the target as if the normal @code{cmp@var{mode}} +pattern had been emitted. If the pattern does not @code{FAIL}, then +the rtl expanders will be invoking either the @code{beq} or @code{bne} +pattern to make use of the comparison. + +If this pattern is not defined, then a plain compare pattern is used. + @end table @end ifset |