The branch stable/13 has been updated by hselasky:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=6d73b43abf2393ac3ab600f449038346ac08368e

commit 6d73b43abf2393ac3ab600f449038346ac08368e
Author:     Hans Petter Selasky <[email protected]>
AuthorDate: 2022-01-07 13:30:18 +0000
Commit:     Hans Petter Selasky <[email protected]>
CommitDate: 2022-01-07 13:30:18 +0000

    mips: Implement suword16
    
    (cherry picked from commit ac672e747ff15e24ffa99f11c11f27ae305e988f)
---
 sys/mips/mips/support.S | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sys/mips/mips/support.S b/sys/mips/mips/support.S
index 13a2d32a156c..cfcdc27b1d0e 100644
--- a/sys/mips/mips/support.S
+++ b/sys/mips/mips/support.S
@@ -272,6 +272,19 @@ LEAF(fubyte)
        PTR_S   zero, U_PCB_ONFAULT(v1)
 END(fubyte)
 
+LEAF(suword16)
+       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)
+       sh      a1, 0(a0)               # store short
+       PTR_S   zero, U_PCB_ONFAULT(v1)
+       j       ra
+       move    v0, zero
+END(suword16)
+
 LEAF(suword32)
 #ifndef __mips_n64
 XLEAF(suword)

Reply via email to