Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Jul 2010 19:14:06 +0000 (UTC)
From:      "Jayachandran C." <jchandra@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r210625 - head/sys/mips/mips
Message-ID:  <201007291914.o6TJE6OL030382@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jchandra
Date: Thu Jul 29 19:14:06 2010
New Revision: 210625
URL: http://svn.freebsd.org/changeset/base/210625

Log:
  MIPS 64 bit support. Define fuword64() for n64 compilation, fuword() should
  be fuword64() in 64 bit.

Modified:
  head/sys/mips/mips/support.S

Modified: head/sys/mips/mips/support.S
==============================================================================
--- head/sys/mips/mips/support.S	Thu Jul 29 19:08:22 2010	(r210624)
+++ head/sys/mips/mips/support.S	Thu Jul 29 19:14:06 2010	(r210625)
@@ -429,8 +429,9 @@ END(copyerr)
  * {fu,su},{byte,sword,word}, fetch or store a byte, short or word to
  * user data space.
  */
-LEAF(fuword)
-ALEAF(fuword32)
+#ifdef __mips_n64
+LEAF(fuword64)
+ALEAF(fuword)
 ALEAF(fuiword)
 	PTR_LA	v0, fswberr
 	blt	a0, zero, fswberr	# make sure address is in user space
@@ -438,10 +439,26 @@ ALEAF(fuiword)
 	GET_CPU_PCPU(v1)
 	PTR_L	v1, PC_CURPCB(v1)
 	PTR_S	v0, U_PCB_ONFAULT(v1)
+	ld	v0, 0(a0)		# fetch word
+	j	ra
+	PTR_S	zero, U_PCB_ONFAULT(v1)
+END(fuword64)
+#endif
+
+LEAF(fuword32)
+#ifndef __mips_n64
+ALEAF(fuword)
+#endif
+	PTR_LA	v0, fswberr
+	blt	a0, zero, fswberr	# make sure address is in user space
+	nop
+	GET_CPU_PCPU(v1)
+	PTR_L	v1, PC_CURPCB(v1)
+	PTR_S	v0, U_PCB_ONFAULT(v1)
 	lw	v0, 0(a0)		# fetch word
 	j	ra
 	PTR_S	zero, U_PCB_ONFAULT(v1)
-END(fuword)
+END(fuword32)
 
 LEAF(fusword)
 ALEAF(fuisword)



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