diff options
author | Caroline Tice <cmtice@google.com> | 2018-01-29 13:36:52 -0800 |
---|---|---|
committer | Caroline Tice <cmtice@google.com> | 2018-01-29 22:19:21 +0000 |
commit | d64d815b3af9d2653d924ea2e1ebb21ee8b043b7 (patch) | |
tree | 41ddc808254fa6b40de6540413015909760ec306 /gcc-4.9/gcc/doc | |
parent | 430f43829fa42b459ccbb53b44843c54c8ba4550 (diff) | |
download | toolchain_gcc-d64d815b3af9d2653d924ea2e1ebb21ee8b043b7.tar.gz toolchain_gcc-d64d815b3af9d2653d924ea2e1ebb21ee8b043b7.tar.bz2 toolchain_gcc-d64d815b3af9d2653d924ea2e1ebb21ee8b043b7.zip |
[GCC] Update with latest retpoline fixes from Intel.
Intel has updated their retpoline patches since we created our
original patch. This CL updates our retpoline changes to match
the latest from Intel.
Bug: None
Test: Tested extensively in ChromeOS. Built x86 platform & kernel
images in Android.
Change-Id: Id1a18cb1f1f4461832a017cb5c5d59e5400d9d08
Diffstat (limited to 'gcc-4.9/gcc/doc')
-rw-r--r-- | gcc-4.9/gcc/doc/extend.texi | 19 | ||||
-rw-r--r-- | gcc-4.9/gcc/doc/invoke.texi | 39 |
2 files changed, 57 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/doc/extend.texi b/gcc-4.9/gcc/doc/extend.texi index 4c0914a35..dfef30042 100644 --- a/gcc-4.9/gcc/doc/extend.texi +++ b/gcc-4.9/gcc/doc/extend.texi @@ -4088,6 +4088,25 @@ Specify which floating-point unit to use. The @code{target("fpmath=sse,387")} option must be specified as @code{target("fpmath=sse+387")} because the comma would separate different options. + +@item indirect_branch("@var{choice}") +@cindex @code{indirect_branch} function attribute, x86 +On x86 targets, the @code{indirect_branch} attribute causes the compiler +to convert indirect call and jump with @var{choice}. @samp{keep} +keeps indirect call and jump unmodified. @samp{thunk} converts indirect +call and jump to call and return thunk. @samp{thunk-inline} converts +indirect call and jump to inlined call and return thunk. +@samp{thunk-extern} converts indirect call and jump to external call +and return thunk provided in a separate object file. + +@item function_return("@var{choice}") +@cindex @code{function_return} function attribute, x86 +On x86 targets, the @code{function_return} attribute causes the compiler +to convert function return with @var{choice}. @samp{keep} keeps function +return unmodified. @samp{thunk} converts function return to call and +return thunk. @samp{thunk-inline} converts function return to inlined +call and return thunk. @samp{thunk-extern} converts function return to +external call and return thunk provided in a separate object file. @end table On the PowerPC, the following options are allowed: diff --git a/gcc-4.9/gcc/doc/invoke.texi b/gcc-4.9/gcc/doc/invoke.texi index 698ecd659..297657a39 100644 --- a/gcc-4.9/gcc/doc/invoke.texi +++ b/gcc-4.9/gcc/doc/invoke.texi @@ -694,7 +694,8 @@ Objective-C and Objective-C++ Dialects}. -m32 -m64 -mx32 -m16 -mlarge-data-threshold=@var{num} @gol -msse2avx -mfentry -m8bit-idiv @gol -mavx256-split-unaligned-load -mavx256-split-unaligned-store @gol --mstack-protector-guard=@var{guard}} +-mstack-protector-guard=@var{guard} -mindirect-branch=@var{choice} @gol +-mfunction-return=@var{choice} -mindirect-branch-register} @emph{i386 and x86-64 Windows Options} @gccoptlist{-mconsole -mcygwin -mno-cygwin -mdll @gol @@ -16021,6 +16022,42 @@ locations are @samp{global} for global canary or @samp{tls} for per-thread canary in the TLS block (the default). This option has effect only when @option{-fstack-protector} or @option{-fstack-protector-all} is specified. +@item -mindirect-branch=@var{choice} +@opindex -mindirect-branch +Convert indirect call and jump with @var{choice}. The default is +@samp{keep}, which keeps indirect call and jump unmodified. +@samp{thunk} converts indirect call and jump to call and return thunk. +@samp{thunk-inline} converts indirect call and jump to inlined call +and return thunk. @samp{thunk-extern} converts indirect call and jump +to external call and return thunk provided in a separate object file. +You can control this behavior for a specific function by using the +function attribute @code{indirect_branch}. @xref{Function Attributes}. + +Note that @option{-mcmodel=large} is incompatible with +@option{-mindirect-branch=thunk} nor +@option{-mindirect-branch=thunk-extern} since the thunk function may +not be reachable in large code model. + +@item -mfunction-return=@var{choice} +@opindex -mfunction-return +Convert function return with @var{choice}. The default is @samp{keep}, +which keeps function return unmodified. @samp{thunk} converts function +return to call and return thunk. @samp{thunk-inline} converts function +return to inlined call and return thunk. @samp{thunk-extern} converts +function return to external call and return thunk provided in a separate +object file. You can control this behavior for a specific function by +using the function attribute @code{function_return}. +@xref{Function Attributes}. + +Note that @option{-mcmodel=large} is incompatible with +@option{-mfunction-return=thunk} nor +@option{-mfunction-return=thunk-extern} since the thunk function may +not be reachable in large code model. + +@item -mindirect-branch-register +@opindex -mindirect-branch-register +Force indirect call and jump via register. + @end table These @samp{-m} switches are supported in addition to the above |