1
0
mirror of https://github.com/golang/go synced 2024-11-24 04:10:14 -07:00

runtime: handle malloc > 2GB correctly

R=ken2
CC=golang-dev
https://golang.org/cl/821048
This commit is contained in:
Russ Cox 2010-04-05 17:26:59 -07:00
parent 99d258a2f0
commit d89b357f76
4 changed files with 18 additions and 18 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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*);