> On Mar 18, 2022, at 11:09 AM, Richard Sandiford <richard.sandif...@arm.com> > wrote: > > Xi Ruoyao <xry...@mengyan1223.wang> writes: >>> >>> If we have to go this way, I think it’s better to make the change you >>> suggested above, >>> and then also update the documentation, both internal documentation on >>> how to define >>> the hook and the user level documentation on what the user might >>> expect when using >>> this option (i.e, it’s possible that the compiler might clear more >>> registers than the user >>> requests on some targets due to the implementation limitation). >>> >>> I can make this change if we decide to do this. >> >> I'd vote for this. Richard? > > Fine by me too, although I don't think this should be mentioned > in the user documentation. E.g. used-arg means that non-argument, > non-return registers can have any value on return from the function; > the compiler doesn't make any guarantees. If the compiler happens to > use a temporary register in the implementation of the option, and if > that temporary register happens to still be zero on return, then > that's OK. It's just an internal implementation detail. The same > thing could happen for any part of the epilogue.
This makes good sense to me. I agree. Okay, will just add an extra argument and update the internal documentation. thanks. Qing > > Thanks, > Richard