Add declarations of suword32 and suword64. Add implementations of one or

the other (or both) to all the platforms. Similar for fuword32 and
fuword64.
This commit is contained in:
Doug Rabson 2002-05-26 16:03:13 +00:00
parent a6b82b31b1
commit 396a429cfd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97307
9 changed files with 98 additions and 0 deletions

View File

@ -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 */

View File

@ -1189,6 +1189,9 @@ ENTRY(fuword)
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 @@ ENTRY(suword)
movl %eax,PCB_ONFAULT(%ecx)
ret
ENTRY(suword32)
jmp suword
/*
* susword - MP SAFE (if not I386_CPU)
*/

View File

@ -1189,6 +1189,9 @@ ENTRY(fuword)
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 @@ ENTRY(suword)
movl %eax,PCB_ONFAULT(%ecx)
ret
ENTRY(suword32)
jmp suword
/*
* susword - MP SAFE (if not I386_CPU)
*/

View File

@ -1189,6 +1189,9 @@ ENTRY(fuword)
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 @@ ENTRY(suword)
movl %eax,PCB_ONFAULT(%ecx)
ret
ENTRY(suword32)
jmp suword
/*
* susword - MP SAFE (if not I386_CPU)
*/

View File

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

View File

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

View File

@ -511,6 +511,18 @@ ENTRY(fuword)
FU_BYTES(ldxa, 8, .Lfsfault)
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)
*/
@ -571,6 +583,18 @@ ENTRY(suword)
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

View File

@ -511,6 +511,18 @@ ENTRY(fuword)
FU_BYTES(ldxa, 8, .Lfsfault)
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)
*/
@ -571,6 +583,18 @@ ENTRY(suword)
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

View File

@ -180,8 +180,12 @@ int copyout(const void *kaddr, void *udaddr, size_t len);
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);