Module Name: src
Committed By: matt
Date: Wed Aug 19 07:36:56 UTC 2009
Modified Files:
src/sys/arch/mips/mips [matt-nb5-mips64]: sig_machdep.c
Log Message:
Don't cast pointers to __greg_t because that causes warnings on N32/N64.
Use intptr_t instead (intptr_t is used to get sign extension which is
important on mips).
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.16.14.1 src/sys/arch/mips/mips/sig_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/mips/sig_machdep.c
diff -u src/sys/arch/mips/mips/sig_machdep.c:1.16 src/sys/arch/mips/mips/sig_machdep.c:1.16.14.1
--- src/sys/arch/mips/mips/sig_machdep.c:1.16 Mon Apr 28 20:23:28 2008
+++ src/sys/arch/mips/mips/sig_machdep.c Wed Aug 19 07:36:56 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: sig_machdep.c,v 1.16 2008/04/28 20:23:28 martin Exp $ */
+/* $NetBSD: sig_machdep.c,v 1.16.14.1 2009/08/19 07:36:56 matt Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.16 2008/04/28 20:23:28 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.16.14.1 2009/08/19 07:36:56 matt Exp $");
#include "opt_cputype.h"
#include "opt_compat_netbsd.h"
@@ -63,7 +63,7 @@
if (*onstack)
return (char *)l->l_sigstk.ss_sp + l->l_sigstk.ss_size;
else
- return (void *)fp->f_regs[_R_SP];
+ return (void *)(intptr_t)fp->f_regs[_R_SP];
}
struct sigframe_siginfo {
@@ -133,13 +133,13 @@
* to the signal trampoline to bounce us back.
*/
tf->f_regs[_R_A0] = sig;
- tf->f_regs[_R_A1] = (__greg_t)&fp->sf_si;
- tf->f_regs[_R_A2] = (__greg_t)&fp->sf_uc;
+ tf->f_regs[_R_A1] = (intptr_t)&fp->sf_si;
+ tf->f_regs[_R_A2] = (intptr_t)&fp->sf_uc;
- tf->f_regs[_R_PC] = (__greg_t)catcher;
- tf->f_regs[_R_T9] = (__greg_t)catcher;
- tf->f_regs[_R_SP] = (__greg_t)fp;
- tf->f_regs[_R_RA] = (__greg_t)ps->sa_sigdesc[sig].sd_tramp;
+ tf->f_regs[_R_PC] = (intptr_t)catcher;
+ tf->f_regs[_R_T9] = (intptr_t)catcher;
+ tf->f_regs[_R_SP] = (intptr_t)fp;
+ tf->f_regs[_R_RA] = (intptr_t)ps->sa_sigdesc[sig].sd_tramp;
/* Remember that we're now on the signal stack. */
if (onstack)