diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2008-03-23 12:06:46 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2008-03-23 12:06:46 +0000 |
commit | e8b5627cf9e5201e211a89d04f2696e642690201 (patch) | |
tree | 82e98cb614183be0f5a4c3bd644952071969391b /sys | |
parent | 6dd17c073175c04117dafb70c410dc6ccc047e2d (diff) |
Make ovbcopy() the default bcopy() flavour; requested by deraadt@ some time ago.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/sparc/sparc/locore.s | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/arch/sparc/sparc/locore.s b/sys/arch/sparc/sparc/locore.s index 87e255e60f4..3a3102ee20a 100644 --- a/sys/arch/sparc/sparc/locore.s +++ b/sys/arch/sparc/sparc/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.76 2008/03/15 13:28:43 miod Exp $ */ +/* $OpenBSD: locore.s,v 1.77 2008/03/23 12:06:45 miod Exp $ */ /* $NetBSD: locore.s,v 1.73 1997/09/13 20:36:48 pk Exp $ */ /* @@ -4315,14 +4315,14 @@ ENTRY(copyout) mov EFAULT, %o0 /* - * ******NOTE****** this depends on bcopy() not using %g7 + * ******NOTE****** this depends on old bcopy() not using %g7 */ Ldocopy: ! sethi %hi(_C_LABEL(cpcb)), %o3 ld [%o3 + %lo(_C_LABEL(cpcb))], %o3 set Lcopyfault, %o4 mov %o7, %g7 ! save return address - call _C_LABEL(bcopy) ! bcopy(src, dst, len) + call Lbcopy_old ! bcopy(src, dst, len) st %o4, [%o3 + PCB_ONFAULT] sethi %hi(_C_LABEL(cpcb)), %o3 @@ -4719,7 +4719,7 @@ ENTRY(qzero) nop /* - * kernel bcopy/memcpy + * kernel old bcopy/memcpy * Assumes regions do not overlap; has no useful return value. * * Must not use %g7 (see copyin/copyout above). @@ -4735,7 +4735,7 @@ ENTRY(memcpy) mov %o0, %o3 mov %o1, %o0 mov %o3, %o1 -ENTRY(bcopy) +Lbcopy_old: cmp %o2, BCOPY_SMALL Lbcopy_start: bge,a Lbcopy_fancy ! if >= this many, go be fancy. @@ -4901,11 +4901,12 @@ Lbcopy_done: retl stb %o4,[%o1] /* - * ovbcopy(src, dst, len): like bcopy, but regions may overlap. + * ovbcopy(src, dst, len): like old bcopy, but regions may overlap. */ +ENTRY(bcopy) ENTRY(ovbcopy) cmp %o0, %o1 ! src < dst? - bgeu Lbcopy_start ! no, go copy forwards as via bcopy + bgeu Lbcopy_start ! no, go copy forwards as via old bcopy cmp %o2, BCOPY_SMALL! (check length for doublecopy first) /* @@ -5060,7 +5061,7 @@ Lback_mopb: stb %o4, [%o1 - 1] ! } /* - * kcopy() is exactly like bcopy except that it set pcb_onfault such that + * kcopy() is exactly like old bcopy except that it set pcb_onfault such that * when a fault occurs, it is able to return -1 to indicate this to the * caller. */ @@ -5105,7 +5106,7 @@ Lkcopy_fancy: EMPTY btst 7, %o1 be,a Lkcopy_doubles - dec 8, %o2 ! if all lined up, len -= 8, goto bcopy_doubes + dec 8, %o2 ! if all lined up, len -= 8, goto bcopy_doubles ! If the low bits match, we can make these line up. 1: |