summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libc/alpha/sys/sbrk.S2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/alpha/sys/sbrk.S b/lib/libc/alpha/sys/sbrk.S
index 3ecdd68..5f4e15a 100644
--- a/lib/libc/alpha/sys/sbrk.S
+++ b/lib/libc/alpha/sys/sbrk.S
@@ -40,9 +40,11 @@ LEAF(sbrk, 1)
br pv, L1 /* XXX profiling */
L1: LDGP(pv)
ldq a1, curbrk
+ beq a0, L2
addq a0, a1, a0
CALLSYS_ERROR(break)
stq a0, curbrk
+L2:
mov a1, v0
RET
END(sbrk)
OpenPOWER on IntegriCloud