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

runtime: fix freebsd/386 mmap

The runtime only passes 32 bits of file offset,
but the kernel wants 64 bits, so have to add
zeros explicitly in a copy of the arguments.

R=adg, Martin Neubauer
CC=golang-dev
https://golang.org/cl/1933044
This commit is contained in:
Russ Cox 2010-08-24 13:04:02 -04:00
parent b1311cbc93
commit e1e829b786

View File

@ -66,7 +66,18 @@ TEXT notok(SB),7,$0
MOVL $0xf1, 0xf1
RET
TEXT ·mmap(SB),7,$-4
TEXT ·mmap(SB),7,$32
LEAL arg0+0(FP), SI
LEAL 4(SP), DI
CLD
MOVSL
MOVSL
MOVSL
MOVSL
MOVSL
MOVSL
MOVL $0, AX // top 64 bits of file offset
STOSL
MOVL $477, AX
INT $0x80
JAE 2(PC)