Module Name:    src
Committed By:   matt
Date:           Fri Jan 22 08:35:59 UTC 2010

Modified Files:
        src/sys/arch/mips/mips [matt-nb5-mips64]: mips_emul.c

Log Message:
Use ufetch/ustore for all user access


To generate a diff of this commit:
cvs rdiff -u -r1.14.78.6 -r1.14.78.7 src/sys/arch/mips/mips/mips_emul.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_emul.c
diff -u src/sys/arch/mips/mips/mips_emul.c:1.14.78.6 src/sys/arch/mips/mips/mips_emul.c:1.14.78.7
--- src/sys/arch/mips/mips/mips_emul.c:1.14.78.6	Fri Jan 22 07:05:28 2010
+++ src/sys/arch/mips/mips/mips_emul.c	Fri Jan 22 08:35:59 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_emul.c,v 1.14.78.6 2010/01/22 07:05:28 matt Exp $ */
+/*	$NetBSD: mips_emul.c,v 1.14.78.7 2010/01/22 08:35:59 matt Exp $ */
 
 /*
  * Copyright (c) 1999 Shuichiro URATA.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.14.78.6 2010/01/22 07:05:28 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.14.78.7 2010/01/22 08:35:59 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -104,7 +104,7 @@
 	vaddr_t nextpc;
 
 	if (instpc < MIPS_KSEG0_START)
-		inst.word = fuiword((void *)instpc);
+		inst.word = ufetch_uint32((void *)instpc);
 	else
 		inst.word = *(unsigned *)instpc;
 
@@ -452,7 +452,7 @@
 			return;
 
 		vaddr = frame->f_regs[_R_PC];	/* XXX truncates to 32 bits */
-		inst = fuiword((uint32_t *)vaddr);
+		inst = ufetch_uint32((uint32_t *)vaddr);
 		if (((InstFmt)inst).FRType.op != OP_LWC1)
 			return;
 
@@ -542,7 +542,7 @@
 			return;
 
 		vaddr = frame->f_regs[_R_PC];	/* XXX truncates to 32 bits */
-		inst = fuiword((uint32_t *)vaddr);
+		inst = ufetch_uint32((uint32_t *)vaddr);
 		if (((InstFmt)inst).FRType.op != OP_SWC1)
 			return;
 
@@ -896,7 +896,7 @@
 		return;
 	}
 
-	if (subyte((void *)vaddr, frame->f_regs[(inst>>16)&0x1F]) < 0) {
+	if (ustore_uint8((void *)vaddr, frame->f_regs[(inst>>16)&0x1F]) < 0) {
 		send_sigsegv(vaddr, T_TLB_ST_MISS, frame, cause);
 		return;
 	}
@@ -919,7 +919,7 @@
 		return;
 	}
 
-	if (susword((void *)vaddr, frame->f_regs[(inst>>16)&0x1F]) < 0) {
+	if (ustore_uint16((void *)vaddr, frame->f_regs[(inst>>16)&0x1F]) < 0) {
 		send_sigsegv(vaddr, T_TLB_ST_MISS, frame, cause);
 		return;
 	}

Reply via email to