Commit e1e829b7 authored by Russ Cox's avatar Russ Cox

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
parent b1311cbc
...@@ -66,7 +66,18 @@ TEXT notok(SB),7,$0 ...@@ -66,7 +66,18 @@ TEXT notok(SB),7,$0
MOVL $0xf1, 0xf1 MOVL $0xf1, 0xf1
RET 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 MOVL $477, AX
INT $0x80 INT $0x80
JAE 2(PC) JAE 2(PC)
......
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