1
0
mirror of https://github.com/golang/go synced 2024-11-25 05:17:57 -07:00

fix different ANON flag between

darwin and linux

SVN=121371
This commit is contained in:
Ken Thompson 2008-06-05 21:02:55 -07:00
parent 959f9fb3d4
commit fa259ff89c

View File

@ -60,9 +60,18 @@ TEXT sys_mmap(SB),1,$-8
MOVQ 8(SP), DI
MOVL 16(SP), SI
MOVL 20(SP), DX
MOVL 24(SP), R10
MOVL 24(SP), CX
MOVL 28(SP), R8
MOVL 32(SP), R9
/* flags arg for ANON is 1000 but sb 20 */
MOVL CX, AX
ANDL $~0x1000, CX
ANDL $0x1000, AX
SHRL $7, AX
ORL AX, CX
MOVL CX, R10
MOVL $9, AX // syscall entry
SYSCALL
CMPQ AX, $0xfffffffffffff001