mirror of
https://github.com/golang/go
synced 2024-11-18 18:14:43 -07:00
syscall: fix arithmetic errors in assembly for seek function for 64-bit Plan 9
Offsets for return values from seek were miscalculated and a translation from 32-bit code for error handling was incorrect. R=rsc, rminnich, npe CC=golang-dev https://golang.org/cl/7181045
This commit is contained in:
parent
f8284b64ce
commit
85f86399f4
@ -128,7 +128,7 @@ TEXT ·RawSyscall6(SB),7,$0
|
||||
|
||||
//func seek(placeholder uintptr, fd int, offset int64, whence int) (newoffset int64, err string)
|
||||
TEXT ·seek(SB),7,$0
|
||||
LEAQ newoffset+48(SP), AX
|
||||
LEAQ newoffset+40(SP), AX
|
||||
MOVQ AX, placeholder+8(SP)
|
||||
|
||||
MOVQ $0x8000, AX // for NxM
|
||||
@ -137,8 +137,7 @@ TEXT ·seek(SB),7,$0
|
||||
|
||||
CMPQ AX, $-1
|
||||
JNE ok6
|
||||
MOVQ AX, 48(SP) // newoffset low
|
||||
MOVQ AX, 56(SP) // newoffset high
|
||||
MOVQ AX, 40(SP) // newoffset
|
||||
|
||||
SUBQ $16, SP
|
||||
CALL syscall·errstr(SB)
|
||||
@ -150,7 +149,7 @@ ok6:
|
||||
LEAQ runtime·emptystring(SB), SI
|
||||
|
||||
copyresult6:
|
||||
LEAQ err+64(SP), DI
|
||||
LEAQ err+48(SP), DI
|
||||
|
||||
CLD
|
||||
MOVSQ
|
||||
|
Loading…
Reference in New Issue
Block a user