Module Name:    src
Committed By:   matt
Date:           Wed Aug 24 15:11:52 UTC 2011

Modified Files:
        src/sys/arch/mips/mips: mips_fixup.c

Log Message:
On N32 kernels, cast offset to (intptr_t) to shrink it back to 32-bits.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/mips/mips_fixup.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/mips_fixup.c
diff -u src/sys/arch/mips/mips/mips_fixup.c:1.7 src/sys/arch/mips/mips/mips_fixup.c:1.8
--- src/sys/arch/mips/mips/mips_fixup.c:1.7	Wed Aug 17 14:39:59 2011
+++ src/sys/arch/mips/mips/mips_fixup.c	Wed Aug 24 15:11:52 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_fixup.c,v 1.7 2011/08/17 14:39:59 matt Exp $	*/
+/*	$NetBSD: mips_fixup.c,v 1.8 2011/08/24 15:11:52 matt Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.7 2011/08/17 14:39:59 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.8 2011/08/24 15:11:52 matt Exp $");
 
 #include "opt_mips3_wired.h"
 #include "opt_multiprocessor.h"
@@ -280,7 +280,8 @@
 				goto out;
 			}
 			regs[insn.IType.rt] = *(const int32_t *)
-			    (regs[insn.IType.rs] + (int16_t)insn.IType.imm);
+			    ((intptr_t)regs[insn.IType.rs]
+			    + (int16_t)insn.IType.imm);
 			used |= (1 << insn.IType.rt);
 			break;
 #endif

Reply via email to