access saved values of upper xmm/ymm/zmm registers in signal handler

Joseph Devietti devietti@cis.upenn.edu
Sun Aug 9 04:04:40 GMT 2020


Thank you! I was able to find all the registers via struct sigcontext and
reading the XSAVE documentation.

joe

On Sat, Aug 8, 2020 at 3:20 AM Florian Weimer <fw@deneb.enyo.de> wrote:

> * Joseph Devietti via Libc-help:
>
> > I was wondering if there's a way to access the saved values of X86-64's
> > second set of 16 vector registers (xmm16-31, ymm16-31 and/or zmm16-31)
> > inside a SA_SIGINFO signal handler, via the ucontext_t* pointer. I've
> tried
> > digging around the code and couldn't find anything promising, but maybe I
> > missed something.
>
> I think the date is in struct _xstate, which can be accessed via the
> struct sigcontext and its fpstate member.  The format should follow
> what the XSAVE* instructions produce; you will have to review the
> processor manual to figure out how to decode it.
>


More information about the Libc-help mailing list