Commit d89b357f authored by Russ Cox's avatar Russ Cox

runtime: handle malloc > 2GB correctly

R=ken2
CC=golang-dev
https://golang.org/cl/821048
parent 99d258a2
......@@ -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)
......
......@@ -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)
......
......@@ -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
......
......@@ -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*);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment