]> Cypherpunks repositories - gostls13.git/commit
runtime: use 64-bit negative error code on 64-bit machines
authorRuss Cox <rsc@golang.org>
Fri, 15 Mar 2013 03:42:11 +0000 (23:42 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 15 Mar 2013 03:42:11 +0000 (23:42 -0400)
commite3c7a9db83b98a936cd90c46f39d86080c30a0d6
treed887478db54ca93677ee85bde21986a619e501c0
parentb7f29e259d2b0255ce22060ca7b8f8aaf2679487
runtime: use 64-bit negative error code on 64-bit machines

NEGL does a negation of the bottom 32 bits and then zero-extends to 64 bits,
resulting in a negative 32-bit number but a positive 64-bit number.

NEGQ does a full 64-bit negation, so that the result is negative both as
a 32-bit and as a 64-bit number.

This doesn't matter for the functions that are declared to return int32.
It only matters for the ones that return int64 or void* [sic].

This will fix the current incorrect error in the OpenBSD/amd64 build.
The build will still be broken, but it won't report a bogus error.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7536046
src/pkg/runtime/sys_darwin_amd64.s
src/pkg/runtime/sys_freebsd_amd64.s
src/pkg/runtime/sys_netbsd_amd64.s
src/pkg/runtime/sys_openbsd_amd64.s