Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch Use an unsigned comparison against minbrk.



details:   https://anonhg.NetBSD.org/src/rev/ee407ed91db3
branches:  trunk
changeset: 556739:ee407ed91db3
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Dec 26 11:21:48 2003 +0000

description:
Use an unsigned comparison against minbrk.
>From OpenBSD, changed by Miod Vallat.

diffstat:

 lib/libc/arch/m68k/sys/brk.S    |   6 +++---
 lib/libc/arch/sparc/sys/brk.S   |   8 ++++----
 lib/libc/arch/sparc64/sys/brk.S |  10 +++++-----
 lib/libc/arch/vax/sys/brk.S     |   6 +++---
 4 files changed, 15 insertions(+), 15 deletions(-)

diffs (131 lines):

diff -r 888da5146d5f -r ee407ed91db3 lib/libc/arch/m68k/sys/brk.S
--- a/lib/libc/arch/m68k/sys/brk.S      Fri Dec 26 11:19:50 2003 +0000
+++ b/lib/libc/arch/m68k/sys/brk.S      Fri Dec 26 11:21:48 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: brk.S,v 1.14 2003/08/07 16:42:14 agc Exp $     */
+/*     $NetBSD: brk.S,v 1.15 2003/12/26 11:21:48 martin Exp $  */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -39,7 +39,7 @@
 #if 0
        RCSID("from: @(#)brk.s  5.1 (Berkeley) 5/12/90")
 #else
-       RCSID("$NetBSD: brk.S,v 1.14 2003/08/07 16:42:14 agc Exp $")
+       RCSID("$NetBSD: brk.S,v 1.15 2003/12/26 11:21:48 martin Exp $")
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -72,7 +72,7 @@
        movl    _C_LABEL(__minbrk),%d0
 #endif
        cmpl    %sp@(4),%d0
-       jle     ok
+       jls     ok
        movl    %d0,%sp@(4)
 ok:
        movl    #SYS_break,%d0
diff -r 888da5146d5f -r ee407ed91db3 lib/libc/arch/sparc/sys/brk.S
--- a/lib/libc/arch/sparc/sys/brk.S     Fri Dec 26 11:19:50 2003 +0000
+++ b/lib/libc/arch/sparc/sys/brk.S     Fri Dec 26 11:21:48 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: brk.S,v 1.10 2003/08/07 16:42:25 agc Exp $     */
+/*     $NetBSD: brk.S,v 1.11 2003/12/26 11:21:48 martin Exp $  */
 
 /*
  * Copyright (c) 1992, 1993
@@ -40,7 +40,7 @@
 #if 0
        .asciz "@(#)brk.s       8.1 (Berkeley) 6/4/93"
 #else
-       RCSID("$NetBSD: brk.S,v 1.10 2003/08/07 16:42:25 agc Exp $")
+       RCSID("$NetBSD: brk.S,v 1.11 2003/12/26 11:21:48 martin Exp $")
 #endif
 #endif /* SYSLIBC_SCCS and not lint */
 
@@ -65,7 +65,7 @@
        ld      [%o5 + _C_LABEL(__minbrk)], %o4
        ld      [%o4], %o1              ! %o1 = minbrk
        cmp     %o1, %o0                ! if (minbrk > %o0)
-       bg,a    0f
+       bgu,a   0f
         mov    %o1, %o0                !       %o0 = minbrk
 0:
        mov     %o0, %o2                ! save argument to syscall
@@ -81,7 +81,7 @@
        sethi   %hi(_C_LABEL(__minbrk)), %o1    ! %o1 = minbrk
        ld      [%o1 + %lo(_C_LABEL(__minbrk))], %o1
        cmp     %o1, %o0                ! if (minbrk > %o0)
-       bg,a    0f
+       bgu,a   0f
         mov    %o1, %o0                !       %o0 = minbrk
 0:
        mov     %o0, %o2                ! save argument to syscall
diff -r 888da5146d5f -r ee407ed91db3 lib/libc/arch/sparc64/sys/brk.S
--- a/lib/libc/arch/sparc64/sys/brk.S   Fri Dec 26 11:19:50 2003 +0000
+++ b/lib/libc/arch/sparc64/sys/brk.S   Fri Dec 26 11:21:48 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: brk.S,v 1.11 2003/08/07 16:42:29 agc Exp $     */
+/*     $NetBSD: brk.S,v 1.12 2003/12/26 11:21:48 martin Exp $  */
 
 /*
  * Copyright (c) 1992, 1993
@@ -40,7 +40,7 @@
 #if 0
        .asciz "@(#)brk.s       8.1 (Berkeley) 6/4/93"
 #else
-       RCSID("$NetBSD: brk.S,v 1.11 2003/08/07 16:42:29 agc Exp $")
+       RCSID("$NetBSD: brk.S,v 1.12 2003/12/26 11:21:48 martin Exp $")
 #endif
 #endif /* SYSLIBC_SCCS and not lint */
 
@@ -68,7 +68,7 @@
        ldx     [%o5 + %o4], %o4
        ldx     [%o4], %o1              /* %o1 = minbrk */
        cmp     %o1, %o0                /* if (minbrk > %o0) */
-       movg    %xcc, %o1, %o0          /*      %o0 = minbrk */
+       movgu   %xcc, %o1, %o0          /*      %o0 = minbrk */
        mov     %o0, %o2                /* save argument to syscall */
        mov     SYS_break, %g1
        t       ST_SYSCALL
@@ -84,7 +84,7 @@
        ldx     [%o5 + _C_LABEL(__minbrk)], %o4
        ldx     [%o4], %o1              /* %o1 = minbrk */
        cmp     %o1, %o0                /* if (minbrk > %o0) */
-       movg    %xcc, %o1, %o0          /*      %o0 = minbrk */
+       movgu   %xcc, %o1, %o0          /*      %o0 = minbrk */
        mov     %o0, %o2                /* save argument to syscall */
        mov     SYS_break, %g1
        t       ST_SYSCALL
@@ -99,7 +99,7 @@
        sethi   %hi(_C_LABEL(__minbrk)), %o1    /* %o1 = minbrk */
        ldx     [%o1 + %lo(_C_LABEL(__minbrk))], %o1
        cmp     %o1, %o0                /* if (minbrk > %o0) */
-       movg    %xcc, %o1, %o0          /*      %o0 = minbrk */
+       movgu   %xcc, %o1, %o0          /*      %o0 = minbrk */
        mov     %o0, %o2                /* save argument to syscall */
        mov     SYS_break, %g1
        t       ST_SYSCALL
diff -r 888da5146d5f -r ee407ed91db3 lib/libc/arch/vax/sys/brk.S
--- a/lib/libc/arch/vax/sys/brk.S       Fri Dec 26 11:19:50 2003 +0000
+++ b/lib/libc/arch/vax/sys/brk.S       Fri Dec 26 11:21:48 2003 +0000
@@ -29,7 +29,7 @@
 
 #if defined(SYSLIBC_SCCS) && !defined(lint)
        /* .asciz "@(#)brk.s    8.1 (Berkeley) 6/4/93" */
-       .asciz "$NetBSD: brk.S,v 1.11 2003/08/07 16:42:33 agc Exp $"
+       .asciz "$NetBSD: brk.S,v 1.12 2003/12/26 11:21:48 martin Exp $"
 #endif /* SYSLIBC_SCCS and not lint */
 
 #include "SYS.h"
@@ -42,8 +42,8 @@
 #endif
 
 ENTRY(_brk, 0)
-       cmpl    4(%ap),_C_LABEL(__minbrk)       # gtr > _end 
-       bgeq    1f                              #   is fine
+       cmpl    _C_LABEL(__minbrk),4(%ap)       # gtr > _end 
+       blequ   1f                              #   is fine
        movl    _C_LABEL(__minbrk),4(%ap)       # shrink back to _end
 1:     chmk    $ SYS_break                     # do it
        jcs     err



Home | Main Index | Thread Index | Old Index