Subject: ptrace(2)/procfs support for AltiVec
To: None <>
From: Jason R Thorpe <>
List: port-powerpc
Date: 12/04/2001 17:10:14
Folks... I just committed the following change to the kernel.  It will
allow us to export AltiVec regs via ptrace(2) and procfs.

I will try and look at adding a PT_{GET,SET}ALTIVECREGS for the PowerPC
port within the next week or two.

Module Name:	syssrc
Committed By:	thorpej
Date:		Wed Dec  5 00:58:06 UTC 2001

Modified Files:
	syssrc/sys/arch/i386/i386: process_machdep.c procfs_machdep.c
	syssrc/sys/arch/i386/include: ptrace.h reg.h
	syssrc/sys/kern: sys_process.c
	syssrc/sys/miscfs/procfs: procfs.h procfs_ctl.c procfs_fpregs.c
	    procfs_regs.c procfs_subr.c procfs_vnops.c
	syssrc/sys/sys: ptrace.h

Log Message:
* Allow machine-dependent code to specify hooks for ptrace(2)
  These changes will allow platforms like x86 (XMM) and PowerPC
  (AltiVec) to export extended register sets in a sane manner.

* Use __HAVE_PTRACE_MACHDEP to export x86 XMM registers (standard
  FP + SSE/SSE2) using PT_{GET,SET}XMMREGS (in the machdep
  ptrace request space).
* Use __HAVE_PROCFS_MACHDEP to export x86 XMM registers via
  /proc/N/xmmregs in procfs.

To generate a diff of this commit:
cvs rdiff -r1.39 -r1.40 syssrc/sys/arch/i386/i386/process_machdep.c
cvs rdiff -r1.7 -r1.8 syssrc/sys/arch/i386/i386/procfs_machdep.c
cvs rdiff -r1.6 -r1.7 syssrc/sys/arch/i386/include/ptrace.h
cvs rdiff -r1.16 -r1.17 syssrc/sys/arch/i386/include/reg.h
cvs rdiff -r1.70 -r1.71 syssrc/sys/kern/sys_process.c
cvs rdiff -r1.35 -r1.36 syssrc/sys/miscfs/procfs/procfs.h
cvs rdiff -r1.20 -r1.21 syssrc/sys/miscfs/procfs/procfs_ctl.c
cvs rdiff -r1.8 -r1.9 syssrc/sys/miscfs/procfs/procfs_fpregs.c
cvs rdiff -r1.13 -r1.14 syssrc/sys/miscfs/procfs/procfs_regs.c
cvs rdiff -r1.39 -r1.40 syssrc/sys/miscfs/procfs/procfs_subr.c
cvs rdiff -r1.85 -r1.86 syssrc/sys/miscfs/procfs/procfs_vnops.c
cvs rdiff -r1.22 -r1.23 syssrc/sys/sys/ptrace.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

        -- Jason R. Thorpe <>