diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 1996-08-12 23:03:01 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 1996-08-12 23:03:01 +0000 |
commit | 7390202bec3c554684dae04ed21034f873094306 (patch) | |
tree | 69cc676f15de043c31020e404bcc4864439f040e /lib/libc/arch/mips | |
parent | ba179928942c3009c575169cbabd16217399b786 (diff) |
Stupid bug fixed..
Diffstat (limited to 'lib/libc/arch/mips')
-rw-r--r-- | lib/libc/arch/mips/sys/brk.S | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/libc/arch/mips/sys/brk.S b/lib/libc/arch/mips/sys/brk.S index 357baaacc98..2adcf758d6c 100644 --- a/lib/libc/arch/mips/sys/brk.S +++ b/lib/libc/arch/mips/sys/brk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: brk.S,v 1.3 1996/07/30 20:27:57 pefo Exp $ */ +/* $OpenBSD: brk.S,v 1.4 1996/08/12 23:03:00 pefo Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -39,7 +39,7 @@ #if defined(LIBC_SCCS) && !defined(lint) ASMSTR("from: @(#)brk.s 8.1 (Berkeley) 6/4/93") - ASMSTR("$Id: brk.S,v 1.3 1996/07/30 20:27:57 pefo Exp $") + ASMSTR("$Id: brk.S,v 1.4 1996/08/12 23:03:00 pefo Exp $") #endif /* LIBC_SCCS and not lint */ @@ -53,15 +53,18 @@ minbrk: .word _C_LABEL(end) LEAF(brk) .set reorder lw v0, minbrk - bgeu a0, v0, _C_LABEL(_brk) + bltu a0, v0, 1f + la t9, _brk + jr t9 +1: move a0, v0 # dont allow break < minbrk li v0, SYS_break syscall - bne a3, zero, 1f + bne a3, zero, 2f sw a0, curbrk move v0, zero j ra -1: +2: la t9, _C_LABEL(cerror) jr t9 END(brk) |