* access saved values of upper xmm/ymm/zmm registers in signal handler
@ 2020-08-08 2:49 Joseph Devietti
2020-08-08 7:20 ` Florian Weimer
0 siblings, 1 reply; 3+ messages in thread
From: Joseph Devietti @ 2020-08-08 2:49 UTC (permalink / raw)
To: libc-help
Hi there,
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.
thanks,
joe
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: access saved values of upper xmm/ymm/zmm registers in signal handler
2020-08-08 2:49 access saved values of upper xmm/ymm/zmm registers in signal handler Joseph Devietti
@ 2020-08-08 7:20 ` Florian Weimer
2020-08-09 4:04 ` Joseph Devietti
0 siblings, 1 reply; 3+ messages in thread
From: Florian Weimer @ 2020-08-08 7:20 UTC (permalink / raw)
To: Joseph Devietti via Libc-help; +Cc: Joseph Devietti
* 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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: access saved values of upper xmm/ymm/zmm registers in signal handler
2020-08-08 7:20 ` Florian Weimer
@ 2020-08-09 4:04 ` Joseph Devietti
0 siblings, 0 replies; 3+ messages in thread
From: Joseph Devietti @ 2020-08-09 4:04 UTC (permalink / raw)
To: Florian Weimer; +Cc: Joseph Devietti via Libc-help
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.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-09 4:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-08 2:49 access saved values of upper xmm/ymm/zmm registers in signal handler Joseph Devietti
2020-08-08 7:20 ` Florian Weimer
2020-08-09 4:04 ` Joseph Devietti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).