Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jul 2009 15:18:06 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r195368 - projects/mips/sys/mips/include
Message-ID:  <200907051518.n65FI6bH052774@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Sun Jul  5 15:18:06 2009
New Revision: 195368
URL: http://svn.freebsd.org/changeset/base/195368

Log:
  compute the areas to save registers in for 64-bit access correctly.

Modified:
  projects/mips/sys/mips/include/ucontext.h

Modified: projects/mips/sys/mips/include/ucontext.h
==============================================================================
--- projects/mips/sys/mips/include/ucontext.h	Sun Jul  5 15:17:11 2009	(r195367)
+++ projects/mips/sys/mips/include/ucontext.h	Sun Jul  5 15:18:06 2009	(r195368)
@@ -58,10 +58,14 @@ typedef struct	__mcontext {
 } mcontext_t;
 #endif
 
+#if defined(__mips_n64) || defined(__mips_n32)
+#define	SZREG		8
+#else
 #define	SZREG		4
+#endif
 
 /* offsets into mcontext_t */
-#define	UCTX_REG(x)	(8 + (x)*SZREG)
+#define	UCTX_REG(x)	(4 + SZREG + (x)*SZREG)
 
 #define	UCR_ZERO	UCTX_REG(0)
 #define	UCR_AT		UCTX_REG(1)



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