mirror of
https://github.com/golang/go
synced 2024-11-21 20:44:39 -07:00
runtime: fix mmap comments
We only pass lower 32 bits of file offset to asm routine. R=r, dave, rsc CC=golang-dev https://golang.org/cl/6499118
This commit is contained in:
parent
8572950383
commit
b151af1f36
@ -728,6 +728,9 @@ void runtime·parfordo(ParFor *desc);
|
|||||||
/*
|
/*
|
||||||
* low level C-called
|
* low level C-called
|
||||||
*/
|
*/
|
||||||
|
// for mmap, we only pass the lower 32 bits of file offset to the
|
||||||
|
// assembly routine; the higher bits (if required), should be provided
|
||||||
|
// by the assembly routine as 0.
|
||||||
uint8* runtime·mmap(byte*, uintptr, int32, int32, int32, uint32);
|
uint8* runtime·mmap(byte*, uintptr, int32, int32, int32, uint32);
|
||||||
void runtime·munmap(byte*, uintptr);
|
void runtime·munmap(byte*, uintptr);
|
||||||
void runtime·madvise(byte*, uintptr, int32);
|
void runtime·madvise(byte*, uintptr, int32);
|
||||||
|
@ -89,7 +89,7 @@ TEXT runtime·mmap(SB),7,$32
|
|||||||
MOVSL
|
MOVSL
|
||||||
MOVSL
|
MOVSL
|
||||||
MOVSL
|
MOVSL
|
||||||
MOVL $0, AX // top 64 bits of file offset
|
MOVL $0, AX // top 32 bits of file offset
|
||||||
STOSL
|
STOSL
|
||||||
MOVL $477, AX
|
MOVL $477, AX
|
||||||
INT $0x80
|
INT $0x80
|
||||||
|
@ -68,7 +68,7 @@ TEXT runtime·mmap(SB),7,$36
|
|||||||
MOVL $0, AX
|
MOVL $0, AX
|
||||||
STOSL // arg 6 - pad
|
STOSL // arg 6 - pad
|
||||||
MOVSL // arg 7 - offset
|
MOVSL // arg 7 - offset
|
||||||
MOVL $0, AX // top 64 bits of file offset
|
MOVL $0, AX // top 32 bits of file offset
|
||||||
STOSL
|
STOSL
|
||||||
MOVL $197, AX // sys_mmap
|
MOVL $197, AX // sys_mmap
|
||||||
INT $0x80
|
INT $0x80
|
||||||
|
@ -69,7 +69,7 @@ TEXT runtime·mmap(SB),7,$36
|
|||||||
MOVL $0, AX
|
MOVL $0, AX
|
||||||
STOSL // arg 6 - pad
|
STOSL // arg 6 - pad
|
||||||
MOVSL // arg 7 - offset
|
MOVSL // arg 7 - offset
|
||||||
MOVL $0, AX // top 64 bits of file offset
|
MOVL $0, AX // top 32 bits of file offset
|
||||||
STOSL
|
STOSL
|
||||||
MOVL $197, AX // sys_mmap
|
MOVL $197, AX // sys_mmap
|
||||||
INT $0x80
|
INT $0x80
|
||||||
|
Loading…
Reference in New Issue
Block a user