Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 May 2002 01:31:38 -0700 (PDT)
From:      Doug Rabson <dfr@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 11470 for review
Message-ID:  <200205180831.g4I8Vcl15485@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=11470

Change 11470 by dfr@dfr_home on 2002/05/18 01:30:39

	Add declarations of suword32 and suword64. Add implementations
	of one or the other (or both) to all the platforms. Similar for
	fuword32 and fuword64.

Affected files ...

... //depot/projects/ia64/sys/alpha/alpha/support.s#3 edit
... //depot/projects/ia64/sys/i386/i386/support.s#4 edit
... //depot/projects/ia64/sys/ia64/ia64/trap.c#25 edit
... //depot/projects/ia64/sys/powerpc/powerpc/copyinout.c#4 edit
... //depot/projects/ia64/sys/sparc64/sparc64/support.s#5 edit
... //depot/projects/ia64/sys/sys/systm.h#11 edit

Differences ...

==== //depot/projects/ia64/sys/alpha/alpha/support.s#3 (text+ko) ====

@@ -65,6 +65,7 @@
  */
 	
 	LEAF(suword, 1)
+	XLEAF(suword64, 1)
 	LDGP(pv)
 
 	ldiq	t0, VM_MAXUSER_ADDRESS /* verify address validity */
@@ -110,6 +111,7 @@
 	END(subyte)
 
 	LEAF(fuword, 1)
+	XLEAF(fuword64, 1)
 	LDGP(pv)
 
 	ldiq	t0, VM_MAXUSER_ADDRESS /* verify address validity */

==== //depot/projects/ia64/sys/i386/i386/support.s#4 (text+ko) ====

@@ -1189,6 +1189,9 @@
 	movl	$0,PCB_ONFAULT(%ecx)
 	ret
 
+ENTRY(fuword32)
+	jmp	fuword
+
 /*
  * These two routines are called from the profiling code, potentially
  * at interrupt time. If they fail, that's okay, good things will
@@ -1286,6 +1289,9 @@
 	movl	%eax,PCB_ONFAULT(%ecx)
 	ret
 
+ENTRY(suword32)
+	jmp	suword
+
 /*
  * susword - MP SAFE (if not I386_CPU)
  */

==== //depot/projects/ia64/sys/ia64/ia64/trap.c#25 (text+ko) ====

@@ -926,8 +926,6 @@
 
 #include <i386/include/psl.h>
 
-extern long fuword32(const void *base);
-
 static void
 ia32_syscall(struct trapframe *framep)
 {

==== //depot/projects/ia64/sys/powerpc/powerpc/copyinout.c#4 (text+ko) ====

@@ -265,6 +265,13 @@
 }
 
 int
+suword32(void *addr, u_int32_t word)
+{
+	return (suword(addr, word));
+}
+
+
+int
 fubyte(const void *addr)
 {
 	struct		thread *td;
@@ -314,3 +321,9 @@
 	td->td_pcb->pcb_onfault = NULL;
 	return (val);
 }
+
+u_int32_t
+fuword32(const void *addr)
+{
+	return (fuword(addr));
+}

==== //depot/projects/ia64/sys/sparc64/sparc64/support.s#5 (text+ko) ====

@@ -512,6 +512,18 @@
 END(fuword)
 
 /*
+ * u_int64_t fuword64(const void *base)
+ */
+ENTRY(fuword64)
+#if KTR_COMPILE & KTR_CT1
+	CATR(KTR_CT1, "fuword64: base=%#lx", %g1, %g2, %g3, 7, 8, 9)
+	stx	%o0, [%g1 + KTR_PARM1]
+9:
+#endif
+	FU_BYTES(ldxa, 8, .Lfsfault)
+END(fuword64)
+
+/*
  * int subyte(const void *base, int byte)
  */
 ENTRY(subyte)
@@ -571,6 +583,18 @@
 	SU_BYTES(stxa, 8, .Lfsfault)
 END(suword)
 
+/*
+ * int suword64(const void *base, u_int64_t word)
+ */
+ENTRY(suword64)
+#if KTR_COMPILE & KTR_CT1
+	CATR(KTR_CT1, "suword64: base=%#lx", %g1, %g2, %g3, 7, 8, 9)
+	stx	%o0, [%g1 + KTR_PARM1]
+9:
+#endif
+	SU_BYTES(stxa, 8, .Lfsfault)
+END(suword64)
+
 	.align 16
 .Lfsalign:
 #if KTR_COMPILE & KTR_CT1

==== //depot/projects/ia64/sys/sys/systm.h#11 (text+ko) ====

@@ -180,8 +180,12 @@
 int	fubyte(const void *base);
 int	subyte(void *base, int byte);
 int	suibyte(void *base, int byte);
+int32_t	fuword32(const void *base);
+int64_t	fuword64(const void *base);
 long	fuword(const void *base);
 int	suword(void *base, long word);
+int	suword32(void *base, int32_t word);
+int	suword64(void *base, int64_t word);
 int	fusword(void *base);
 int	susword(void *base, int word);
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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