Re: port-alpha/60479 (alpha fails to save/restore fpu registers on signal delivery)

Jason Thorpe <[email protected]> Wed, 22 Jul 2026 20:05:16 -0700
Newsgroups gmane.os.netbsd.bugs
Message-ID <[email protected]>
> On Jul 22, 2026, at 3:15 PM, Taylor R Campbell via gnats <[email protected]> wrote:
>> 
>> Synopsis: alpha fails to save/restore fpu registers on signal delivery

Taking a peek … “are you sure?”

sendsig_signfo() does:

        cpu_getmcontext(l, &frame.sf_uc.uc_mcontext, &frame.sf_uc.uc_flags);

…and cpu_getmcontext() does:

        /* Save floating point register context, if any, and copy it. */
        if (fpu_valid_p(l)) {
                fpu_save(l);
                (void)memcpy(&mcp->__fpregs, &pcb->pcb_fp,
                    sizeof (mcp->__fpregs));
                mcp->__fpregs.__fp_fpcr = alpha_read_fp_c(l);
                *flags |= _UC_FPU;
        }

I guess I’ll have to fire one up and make sure ucontext / mcontexts tests pass first.

-- thorpej