diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/arch/amd64/sys/sbrk.S | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/arch/amd64/sys/sbrk.S b/lib/libc/arch/amd64/sys/sbrk.S index 677068c4978..98fceaf9e0a 100644 --- a/lib/libc/arch/amd64/sys/sbrk.S +++ b/lib/libc/arch/amd64/sys/sbrk.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sbrk.S,v 1.2 2004/02/10 00:22:51 drahn Exp $ */ +/* $OpenBSD: sbrk.S,v 1.3 2006/05/09 22:52:13 drahn Exp $ */ /* $NetBSD: sbrk.S,v 1.1 2001/06/19 00:25:06 fvdl Exp $ */ /*- @@ -57,7 +57,8 @@ __curbrk: .quad _end SYSENTRY(_sbrk) #ifdef PIC movq PIC_GOT(__curbrk),%rdx - movq (%rdx),%rax + movslq %edi, %rax + movq (%rdx),%rdi addq %rax,%rdi SYSTRAP(break) jc err @@ -70,7 +71,8 @@ err: jmp *%rdx #else movq __curbrk(%rip),%rax - movq %rdi,%rsi + movslq %edi,%rsi + movq %rsi,%rdi addq %rax,%rdi SYSTRAP(break) jc err |