Changeset View
Changeset View
Standalone View
Standalone View
head/sys/mips/mips/support.S
Show First 20 Lines • Show All 411 Lines • ▼ Show 20 Lines | |||||
END(subyte) | END(subyte) | ||||
LEAF(fswberr) | LEAF(fswberr) | ||||
j ra | j ra | ||||
li v0, -1 | li v0, -1 | ||||
END(fswberr) | END(fswberr) | ||||
/* | /* | ||||
* fuswintr and suswintr are just like fusword and susword except that if | |||||
* the page is not in memory or would cause a trap, then we return an error. | |||||
* The important thing is to prevent sleep() and switch(). | |||||
*/ | |||||
LEAF(fuswintr) | |||||
PTR_LA v0, fswintrberr | |||||
blt a0, zero, fswintrberr # 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) | |||||
lhu v0, 0(a0) # fetch short | |||||
j ra | |||||
PTR_S zero, U_PCB_ONFAULT(v1) | |||||
END(fuswintr) | |||||
LEAF(suswintr) | |||||
PTR_LA v0, fswintrberr | |||||
blt a0, zero, fswintrberr # 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(suswintr) | |||||
LEAF(fswintrberr) | |||||
j ra | |||||
li v0, -1 | |||||
END(fswintrberr) | |||||
/* | |||||
* memset(void *s1, int c, int len) | * memset(void *s1, int c, int len) | ||||
* NetBSD: memset.S,v 1.3 2001/10/16 15:40:53 uch Exp | * NetBSD: memset.S,v 1.3 2001/10/16 15:40:53 uch Exp | ||||
*/ | */ | ||||
LEAF(memset) | LEAF(memset) | ||||
.set noreorder | .set noreorder | ||||
blt a2, 12, memsetsmallclr # small amount to clear? | blt a2, 12, memsetsmallclr # small amount to clear? | ||||
move v0, a0 # save s1 for result | move v0, a0 # save s1 for result | ||||
▲ Show 20 Lines • Show All 515 Lines • Show Last 20 Lines |