To review my review… Richard Sandiford via Gcc-patches <gcc-patches@gcc.gnu.org> writes: >> +In addition to the above three basic choices, the register set can be >> further >> +limited by adding "-gpr" (i.e., general purpose register), "-arg" (i.e., >> +argument register), or both as following: > > How about: > > ------------------------------------------------------------------- > In addition to these three basic choices, it is possible to modify > @samp{used} or @samp{all} as follows: > > @itemize @bullet > @item > Adding @samp{-gpr} restricts the zeroing to general-purpose registers. > > @item > Adding @samp{-arg} restricts the zeroing to registers that are used > to pass parameters. When applied to @samp{all}, this includes all > parameter registers defined by the platform's calling convention, > regardless of whether the function uses those parameter registers. > @end @itemize
Actually, I guess this applies to @samp{used} as well. And I guess using “argument” rather than “parameter” would be more consistent. So how about: ------------------------------------------------------------------- Adding @samp{-arg} restricts the zeroing to registers that can sometimes be used to pass function arguments. This includes all arguments registers defined by the platform's calling convention, regardless of whether the function uses those registers for function arguments or not. ------------------------------------------------------------------- >> +@item -fzero-call-used-regs=@var{choice} >> +@opindex fzero-call-used-regs >> +Zero call-used registers at function return to increase the program >> +security by either mitigating Return-Oriented Programming (ROP) or >> +preventing information leak through registers. > > After this, we should probably say something like: > > ------------------------------------------------------------------- > The possible values of @var{choice} are the same as for the > @samp{zero_call_used_regs} attribute (@pxref{…}). The default > is @samp{skip}. > ------------------------------------------------------------------- > > (with the xref filled in) To be clearer, I meant to do this instead of repeating the description. Thanks, Richard