Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Apr 2010 09:26:54 +0000 (UTC)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r206258 - user/jmallett/octeon/sys/mips/mips
Message-ID:  <201004060926.o369Qsgl012237@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmallett
Date: Tue Apr  6 09:26:54 2010
New Revision: 206258
URL: http://svn.freebsd.org/changeset/base/206258

Log:
  o) Reduce structural diffs with NetBSD wrt exception table lookup.
  o) Really, don't move 0 to CP0_STATUS.

Modified:
  user/jmallett/octeon/sys/mips/mips/exception.S

Modified: user/jmallett/octeon/sys/mips/mips/exception.S
==============================================================================
--- user/jmallett/octeon/sys/mips/mips/exception.S	Tue Apr  6 09:06:00 2010	(r206257)
+++ user/jmallett/octeon/sys/mips/mips/exception.S	Tue Apr  6 09:26:54 2010	(r206258)
@@ -179,16 +179,12 @@ VECTOR(MipsException, unknown)
 	and	k0, k0, SR_KSU_USER		# test for user mode
 						# sneaky but the bits are
 						# with us........
-#if defined(__mips_n64)
-	sll	k0, k0, 4			# shift user bit for cause index
-#else
 	sll	k0, k0, 3			# shift user bit for cause index
-#endif
 	and	k1, k1, CR_EXC_CODE		# Mask out the cause bits.
+	or	k1, k1, k0			# change index to user table
 #if defined(__mips_n64)
-	sll	k1, k1, 1			# shift code to get 8-byte offset
+	PTR_SLL	k1, k1, 1			# shift to get 8-byte offset
 #endif
-	or	k1, k1, k0			# change index to user table
 1:
 	PTR_LA	k0, _C_LABEL(machExceptionTable)  # get base of the jump table
 	PTR_ADDU k0, k0, k1			# Get the address of the
@@ -388,7 +384,6 @@ NNON_LEAF(MipsKernGenException, KERN_EXC
 	 * in trap handler
 	 */
 	mfc0	a0, COP_0_STATUS_REG
-	mtc0	zero, COP_0_STATUS_REG
 	and	a0, a0, SR_INT_MASK
 	RESTORE_REG(a1, SR, sp)
 	and	a1, a1, ~SR_INT_MASK



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