https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120870
--- Comment #59 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Uroš Bizjak from comment #58)
> Comment on attachment 64443 [details]
> v2 of the untested patch.
>
>
> > static unsigned int
> > find_drap_reg (void)
> > {
> >+ if (cfun->machine->call_saved_registers == TYPE_PRESERVE_NONE
> >+ || (cfun->machine->call_saved_registers
> >+ == TYPE_NO_CALLEE_SAVED_REGISTERS))
> >+ return X86_NO_CALLEE_DRAP_REG;
> >+
>
> HJ, do we also need to check TYPE_NO_CALLER_SAVED_REGISTERS here?
No. TYPE_NO_CALLER_SAVED_REGISTERS is OK since callee will preserve
everything.