]> Cypherpunks repositories - gostls13.git/commit
syscall: Plan9, amd64: fix syscall error handling in assembly
authorAkshat Kumar <seed@mail.nanosouffle.net>
Mon, 25 Feb 2013 21:40:14 +0000 (22:40 +0100)
committerRon Minnich <rminnich@gmail.com>
Mon, 25 Feb 2013 21:40:14 +0000 (22:40 +0100)
commitb6e322dcf50675ad9ae3f9e587ca9b738004d035
tree14b2cdc70294b6a24b623771875f90d197d90956
parent4eb7ba743d82029063f993bc8eea8940c3c61ac6
syscall: Plan9, amd64: fix syscall error handling in assembly

Syscalls return `-1' on error and the representation is always
32-bits. The `$-1' literal in 64-bit assembly is always the
64-bit representation. So this change makes sure that we
always do a 32-bit comparison when checking for error.
Also makes sure that in the error case, we return a 64-bit
`-1' from runtime.seek.

Fixes the arithmetic for handling the error-string in
runtime.Syscall6.

R=golang-dev, rminnich, rsc, ality, minux.ma
CC=golang-dev
https://golang.org/cl/7399052
src/pkg/syscall/asm_plan9_amd64.s