This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][BZ #6816][2/5] VSX extension to ucontext



Suggested extension to the ucontext, as mentioned in the bugzilla description.


--
Carlos Eduardo Seo
Software Engineer
IBM Linux Technology Center
2008-07-31  Carlos Eduardo Seo  <cseo@linux.vnet.ibm.com>
	    Peter Bergner  <bergner@vnet.ibm.com>

	[BZ #6816]
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym: Defined
	offset in mcontext_t for _UC_VSREGS.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym: Defined
	offset in ucontext_t for SIGCONTEXT_VS_REGS_PTR.
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h (_libc_vsrstate):
	New container for doubleword 1 elements of VSX registers.
	(mcontext_t): New member for doubleword 1 elements of VSX registers.

Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym
===================================================================
--- libc.orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym	2008-07-31 16:40:07.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.sym	2008-07-31 16:40:17.000000000 -0500
@@ -24,3 +24,6 @@
 _UC_VREGS		mcontext (vrregs)
 _UC_VSCR		mcontext (vrregs.vscr)
 _UC_VRSAVE		mcontext (vrregs.vrsave)
+_UC_VSREGS		mcontext (vsregs)
+
+_UC_SIZEOF		sizeof(ucontext_t)
Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym
===================================================================
--- libc.orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym	2008-07-31 16:40:07.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.sym	2008-07-31 16:42:04.000000000 -0500
@@ -48,3 +48,7 @@
 SIGCONTEXT_FP_REGS		mcontext (fp_regs)
 SIGCONTEXT_V_REGS_PTR		mcontext (v_regs)
 SIGCONTEXT_V_RESERVE		mcontext (vmx_reserve)
+SIGCONTEXT_VS_REGS		offsetof (vrregset_t, vsregs_dw1)
+
+_UC_SIZEOF			sizeof(ucontext_t)
+
Index: libc/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
===================================================================
--- libc.orig/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h	2008-07-31 16:40:07.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h	2008-07-31 16:40:17.000000000 -0500
@@ -52,12 +52,19 @@
 	unsigned int vscr;
 } vrregset_t;
 
+/* Container for doubleword 1 elements for VSX registers.  */
+typedef struct _libc_vsrstate
+{
+	unsigned int vsregs_dw1[32][2];
+} vsregset_half_t;
+
 /* Context to describe whole processor state.  */
 typedef struct
 {
 	gregset_t gregs;
 	fpregset_t fpregs;
 	vrregset_t vrregs __attribute__((__aligned__(16)));
+	vsregset_half_t vsregs __attribute__((__aligned__(16)));
 } mcontext_t;
 
 #else
@@ -95,6 +102,7 @@
 	vscr_t		vscr;
 	unsigned int	vrsave;
 	unsigned int	__pad[3];
+	unsigned int	vsregs_dw1[32][2];
 } vrregset_t  __attribute__((__aligned__(16)));
 
 typedef struct {
@@ -126,7 +134,7 @@
  * within the quadword.
  */
 	vrregset_t	*v_regs;
-	long		vmx_reserve[NVRREG+NVRREG+1];
+	long		vmx_reserve[NVRREG+NVRREG+32+1];
 } mcontext_t;
 
 #endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]