Implement fuword32() and suword32(). These functions are used in

kern_thread.c. This is a best effort implementation.
This commit is contained in:
Marcel Moolenaar 2003-06-29 17:14:42 +00:00
parent 7c916264aa
commit 25ae78c736
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117028

View File

@ -84,7 +84,27 @@
mov zero, v0
RET
END(suword)
LEAF(suword32, 2)
LDGP(pv)
ldiq t0, VM_MAXUSER_ADDRESS /* verify address validity */
cmpult a0, t0, t1
beq t1, fusufault
lda t0, fusufault /* trap faults */
ldq t2, PC_CURTHREAD(pcpup)
ldq t2, TD_PCB(t2)
stq t0, PCB_ONFAULT(t2)
stl a1, 0(a0) /* try the store */
stq zero, PCB_ONFAULT(t2) /* clean up */
mov zero, v0
RET
END(suword32)
LEAF(subyte, 1)
LDGP(pv)
@ -130,6 +150,25 @@
RET
END(fuword)
LEAF(fuword32, 1)
LDGP(pv)
ldiq t0, VM_MAXUSER_ADDRESS /* verify address validity */
cmpult a0, t0, t1
beq t1, fusufault
lda t0, fusufault /* trap faults */
ldq t2, PC_CURTHREAD(pcpup)
ldq t2, TD_PCB(t2)
stq t0, PCB_ONFAULT(t2)
ldl v0, 0(a0) /* get the word containing our byte */
stq zero, PCB_ONFAULT(t2) /* clean up */
RET
END(fuword32)
LEAF(fubyte, 1)
LDGP(pv)