diff options
author | jchandra <jchandra@FreeBSD.org> | 2010-07-29 19:14:06 +0000 |
---|---|---|
committer | jchandra <jchandra@FreeBSD.org> | 2010-07-29 19:14:06 +0000 |
commit | cbe1868b4866bfab2c2cb09d20cbbc5700aeba3b (patch) | |
tree | 20d9042aaec4f92c1136411742210eae344c2856 /sys/mips | |
parent | 7cbaa3e8e6d153c09e6a5a92a11f6b17529e1bca (diff) | |
download | FreeBSD-src-cbe1868b4866bfab2c2cb09d20cbbc5700aeba3b.zip FreeBSD-src-cbe1868b4866bfab2c2cb09d20cbbc5700aeba3b.tar.gz |
MIPS 64 bit support. Define fuword64() for n64 compilation, fuword() should
be fuword64() in 64 bit.
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/mips/support.S | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/sys/mips/mips/support.S b/sys/mips/mips/support.S index 4d20b3e..fc92ffe 100644 --- a/sys/mips/mips/support.S +++ b/sys/mips/mips/support.S @@ -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) |