Qing Zhao <qing.z...@oracle.com> writes: >>>> Dropping them is fine with me FWIW. That seems like a natural use >>>> for the new hook: drop zeroing that isn't actively wrong, but isn't >>>> likely to be useful either. >>> >>> Okay, I will add a new hook for this purpose. >> >> It doesn't need to be a new hook. The one I mentioned before >> would enough: >> >>> The kind of target hook interface I was thinking of was: >>> >>> HARD_REG_SET TARGET_EMIT_MOVE_ZEROS (const HARD_REG_SET ®s) >>> >>> which: >>> >>> - emits zeroing instructions for some target-specific subset of REGS >>> >>> - returns the set of registers that were actually cleared >> >> Not clearing mm0-7 and k0-7 would come under the first bullet point. > This makes sense. > > However, how about the second bullet point: > > - returns the set of registers that were actually cleared > > Should we delete mm0-7 and k0-7 from the return set even though they are not > zeroed by the target?
Yes, the point of the return value is to tell the caller what the hook actually did. If the hook didn't clear mm0-7 then the returned set shouldn't include mm0-7. Thanks, Richard