diff options
author | Russ Cox <rsc@golang.org> | 2010-04-05 17:26:59 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-04-05 17:26:59 -0700 |
commit | 8afbc05219e7faac335911d7a326a436826ca8c1 (patch) | |
tree | 2186f030f83cd9ee234b1a468b872e0746f07907 | |
parent | c1ca880a2324453086fc744619fd5e438d94e9a8 (diff) | |
download | golang-8afbc05219e7faac335911d7a326a436826ca8c1.tar.gz |
runtime: handle malloc > 2GB correctly
R=ken2
CC=golang-dev
http://codereview.appspot.com/821048
-rw-r--r-- | src/pkg/runtime/darwin/amd64/sys.s | 10 | ||||
-rw-r--r-- | src/pkg/runtime/freebsd/amd64/sys.s | 12 | ||||
-rw-r--r-- | src/pkg/runtime/linux/amd64/sys.s | 12 | ||||
-rw-r--r-- | src/pkg/runtime/runtime.h | 2 |
4 files changed, 18 insertions, 18 deletions
diff --git a/src/pkg/runtime/darwin/amd64/sys.s b/src/pkg/runtime/darwin/amd64/sys.s index 6d3460ff0..0b85d27db 100644 --- a/src/pkg/runtime/darwin/amd64/sys.s +++ b/src/pkg/runtime/darwin/amd64/sys.s @@ -77,11 +77,11 @@ TEXT sigtramp(SB),7,$40 TEXT ·mmap(SB),7,$0 MOVQ 8(SP), DI // arg 1 addr - MOVL 16(SP), SI // arg 2 len - MOVL 20(SP), DX // arg 3 prot - MOVL 24(SP), R10 // arg 4 flags - MOVL 28(SP), R8 // arg 5 fid - MOVL 32(SP), R9 // arg 6 offset + MOVQ 16(SP), SI // arg 2 len + MOVL 24(SP), DX // arg 3 prot + MOVL 28(SP), R10 // arg 4 flags + MOVL 32(SP), R8 // arg 5 fid + MOVL 36(SP), R9 // arg 6 offset MOVL $(0x2000000+197), AX // syscall entry SYSCALL JCC 2(PC) diff --git a/src/pkg/runtime/freebsd/amd64/sys.s b/src/pkg/runtime/freebsd/amd64/sys.s index 506db29f8..604b763ab 100644 --- a/src/pkg/runtime/freebsd/amd64/sys.s +++ b/src/pkg/runtime/freebsd/amd64/sys.s @@ -91,13 +91,13 @@ TEXT sigtramp(SB),7,$24-16 CALL sighandler(SB) RET -TEXT ·mmap(SB),7,$-8 +TEXT ·mmap(SB),7,$0 MOVQ 8(SP), DI // arg 1 addr - MOVL 16(SP), SI // arg 2 len - MOVL 20(SP), DX // arg 3 prot - MOVL 24(SP), R10 // arg 4 flags - MOVL 28(SP), R8 // arg 5 fid - MOVL 32(SP), R9 // arg 6 offset + MOVQ 16(SP), SI // arg 2 len + MOVL 24(SP), DX // arg 3 prot + MOVL 28(SP), R10 // arg 4 flags + MOVL 32(SP), R8 // arg 5 fid + MOVL 36(SP), R9 // arg 6 offset MOVL $477, AX SYSCALL JCC 2(PC) diff --git a/src/pkg/runtime/linux/amd64/sys.s b/src/pkg/runtime/linux/amd64/sys.s index 882ccf1d2..dd0473158 100644 --- a/src/pkg/runtime/linux/amd64/sys.s +++ b/src/pkg/runtime/linux/amd64/sys.s @@ -76,14 +76,14 @@ TEXT sigreturn(SB),7,$0 SYSCALL INT $3 // not reached -TEXT ·mmap(SB),7,$0-32 +TEXT ·mmap(SB),7,$0 MOVQ 8(SP), DI MOVQ $0, SI - MOVL 16(SP), SI - MOVL 20(SP), DX - MOVL 24(SP), R10 - MOVL 28(SP), R8 - MOVL 32(SP), R9 + MOVQ 16(SP), SI + MOVL 24(SP), DX + MOVL 28(SP), R10 + MOVL 32(SP), R8 + MOVL 36(SP), R9 MOVL $9, AX // syscall entry SYSCALL diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 0b770ad0e..e2aedb4ce 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -511,7 +511,7 @@ void notewakeup(Note*); /* * low level go-called */ -uint8* runtime_mmap(byte*, uint32, int32, int32, int32, uint32); +uint8* runtime_mmap(byte*, uintptr, int32, int32, int32, uint32); void runtime_memclr(byte*, uint32); void runtime_setcallerpc(void*, void*); void* runtime_getcallerpc(void*); |