Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(58)

Issue 7536046: code review 7536046: runtime: use 64-bit negative error code on 64-bit machines (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by rsc
Modified:
11 years, 1 month ago
Reviewers:
CC:
golang-dev, bradfitz
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : diff -r 332e552cd896 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 332e552cd896 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 276860b4c294 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -12 lines) Patch
src/pkg/runtime/sys_darwin_amd64.s View 1 5 chunks +5 lines, -5 lines 0 comments Download
src/pkg/runtime/sys_freebsd_amd64.s View 1 1 chunk +1 line, -1 line 0 comments Download
src/pkg/runtime/sys_netbsd_amd64.s View 1 3 chunks +3 lines, -3 lines 0 comments Download
src/pkg/runtime/sys_openbsd_amd64.s View 1 3 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 1 month ago (2013-03-14 21:38:31 UTC) #1
bradfitz
LGTM On Thu, Mar 14, 2013 at 2:38 PM, <rsc@golang.org> wrote: > Reviewers: golang-dev1, > ...
11 years, 1 month ago (2013-03-14 21:55:10 UTC) #2
rsc
11 years, 1 month ago (2013-03-15 03:42:16 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=ecbd34b63ac1 ***

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://codereview.appspot.com/7536046
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b