Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Oct 2002 22:39:22 +0200 (CEST)
From:      Mark Kettenis <kettenis@chello.nl>
To:        freebsd-arch@freebsd.org
Cc:        bsd-api-discuss@wasabisystems.com
Subject:   ptrace(2) and vector registers
Message-ID:  <200210212039.g9LKdMjS001116@elgar.kettenis.dyndns.org>

next in thread | raw e-mail | index | archive | help
[ CC'd to bsd-api-discuss since it might interest folks there. ]

For a while now, FreeBSD includes support for the SSE registers found
on newer Intel and AMD processors.  However up until now these
registers haven't been exposed outside the kernel, neither via /proc
nor via ptrace(2).  Therefore, GDB doesn't support these registers on
FreeBSD yet.  Since I want to get this working, I'm willing to add the
necessary bits to the kernel.

Getting the purely technical bits right isn't terribly difficult and
I'll manage it on my own.  However, since the infrastructure for
machine-specific ptrace(2) requests was minimalized not too long ago,
I'm wondering if we shouldn't try to come up with a machine
independent API for things like the ix86 SSE registers.  The powerpc
for instance has its AltiVec registers.

NetBSD already has support for the SSE registers.  There is `struct
xmmregs' in <machine/reg.h> and PT_GETXMMREGS & PT_SETXMMREGS
reequests in <machine/ptrace.h>.  I have to say that I'm not terribly
happy with `struct xmmregs', since it ends with an 's', where the
other structs in <machine/ptrace.h> (`struct reg' and `struct fpreg')
don't.  But the most inportant thing is that these names are tied to
the x86.  Since both SSE and AltiVec are some sort of vector registers
I'd like to propose `struct vreg' and PT_GETVREGS & PT_SETVREGS as
alternatives.  NetBSD/powerpc already defines `struct vreg'.

Mark Kettenis

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210212039.g9LKdMjS001116>