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

Issue 6550058: code review 6550058: build: make int 64 bits on amd64 (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by rsc
Modified:
12 years, 6 months ago
Reviewers:
luriel, mtj1, dave, iant2, tru64ufs
CC:
iant, r, bradfitz, remyoudompheng, golang-dev
Visibility:
Public.

Description

build: make int 64 bits on amd64 The assembly offsets were converted mechanically using code.google.com/p/rsc/cmd/asmlint. The instruction changes were done by hand. Fixes issue 2188.

Patch Set 1 #

Patch Set 2 : diff -r 29cff1e8de4e https://code.google.com/p/go/ #

Patch Set 3 : diff -r 4fdee89c5785 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 4fdee89c5785 https://go.googlecode.com/hg/ #

Total comments: 1

Patch Set 5 : diff -r 4fdee89c5785 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 0a3866d6cc6b https://code.google.com/p/go/ #

Patch Set 7 : diff -r 0a3866d6cc6b https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -81 lines) Patch
A doc/go1.1.html View 1 2 3 4 5 1 chunk +65 lines, -0 lines 0 comments Download
M doc/go_faq.html View 1 2 3 4 5 2 chunks +6 lines, -3 lines 0 comments Download
M src/cmd/6g/galign.c View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M src/cmd/6l/l.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/cgo/main.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/dist/goc2c.c View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/bytes/asm_amd64.s View 1 2 3 4 3 chunks +13 lines, -13 lines 0 comments Download
M src/pkg/hash/crc32/crc32_amd64.s View 1 4 chunks +6 lines, -6 lines 0 comments Download
M src/pkg/math/big/arith_amd64.s View 1 11 chunks +51 lines, -51 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M test/index.go View 1 2 2 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 22
rsc
Hello iant, r (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 6 months ago (2012-09-24 19:10:21 UTC) #1
bradfitz
How do benchmarks look?
12 years, 6 months ago (2012-09-24 19:15:12 UTC) #2
remyoudompheng
http://codereview.appspot.com/6550058/diff/6001/src/pkg/bytes/asm_amd64.s File src/pkg/bytes/asm_amd64.s (right): http://codereview.appspot.com/6550058/diff/6001/src/pkg/bytes/asm_amd64.s#newcode97 src/pkg/bytes/asm_amd64.s:97: CMPL BX, CX this looks wrong
12 years, 6 months ago (2012-09-24 19:18:29 UTC) #3
rsc
On 2012/09/24 19:15:12, bradfitz wrote: > How do benchmarks look? Dunno.
12 years, 6 months ago (2012-09-24 19:21:33 UTC) #4
rsc
On 2012/09/24 19:18:29, remyoudompheng wrote: > http://codereview.appspot.com/6550058/diff/6001/src/pkg/bytes/asm_amd64.s > File src/pkg/bytes/asm_amd64.s (right): > > http://codereview.appspot.com/6550058/diff/6001/src/pkg/bytes/asm_amd64.s#newcode97 > ...
12 years, 6 months ago (2012-09-24 19:21:42 UTC) #5
iant
LGTM wait for r
12 years, 6 months ago (2012-09-24 20:06:17 UTC) #6
r
i would like this CL to include at least the key pieces of associated documentation, ...
12 years, 6 months ago (2012-09-24 20:48:40 UTC) #7
rsc
PTAL On Mon, Sep 24, 2012 at 4:48 PM, <r@golang.org> wrote: > i would like ...
12 years, 6 months ago (2012-09-25 00:15:38 UTC) #8
r
LGTM thanks. please run tidy on the new doc to double-check formatting. here's my script ...
12 years, 6 months ago (2012-09-25 00:26:04 UTC) #9
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=ad78acd6f0bb *** build: make int 64 bits on amd64 The assembly offsets ...
12 years, 6 months ago (2012-09-25 00:57:49 UTC) #10
dave_cheney.net
Wow. I'm amazed at how painless this was. I was honestly not expecting this til ...
12 years, 6 months ago (2012-09-25 01:01:17 UTC) #11
mtj1
Running extensive integer application benchmarks now. On Tue, Sep 25, 2012 at 6:31 AM, Dave ...
12 years, 6 months ago (2012-09-25 01:08:24 UTC) #12
tru64ufs
On 2012/09/24 19:10:21, rsc wrote: > Hello iant, r (cc: mailto:golang-dev@googlegroups.com), > > I'd like ...
12 years, 6 months ago (2012-09-25 05:20:17 UTC) #13
mtj1
The natural size of a 64-bit machine with 64-bit pointers and 64-bit file system addresses ...
12 years, 6 months ago (2012-09-25 05:26:21 UTC) #14
tru64ufs
Here's a link to LP64 vs. ILP64 http://www.unix.org/version2/whatsnew/lp64_wp.html The problem is that you will loose ...
12 years, 6 months ago (2012-09-25 05:31:35 UTC) #15
dave_cheney.net
> This is sort of like the change we saw when 32bit application complied > ...
12 years, 6 months ago (2012-09-25 05:33:15 UTC) #16
mtj1
Yes, I suffered through all of this at SGI when we moved from 32 to ...
12 years, 6 months ago (2012-09-25 05:35:36 UTC) #17
tru64ufs
I understand. I was at DEC when that happens as well ;) anyways, the problem ...
12 years, 6 months ago (2012-09-25 05:40:23 UTC) #18
mtj1
It is not my call. The core Go team has been talking about it for ...
12 years, 6 months ago (2012-09-25 05:44:26 UTC) #19
iant2
On Mon, Sep 24, 2012 at 10:20 PM, <tru64ufs@gmail.com> wrote: > > I was wondering ...
12 years, 6 months ago (2012-09-25 05:53:17 UTC) #20
luriel
> On Tue, Sep 25, 2012 at 11:10 AM, <tru64ufs@gmail.com> wrote: >> When we push ...
12 years, 6 months ago (2012-09-25 05:53:23 UTC) #21
tru64ufs
12 years, 6 months ago (2012-09-25 11:03:00 UTC) #22
OK. Got it.
I just started following this list.
Thanks everybody for straighten up this issue.


On 2012/09/25 05:53:17, iant2 wrote:
> On Mon, Sep 24, 2012 at 10:20 PM,  <mailto:tru64ufs@gmail.com> wrote:
> >
> > I was wondering if this is ok by everybody.
> > All the codes that supposed to take up 32bit now occupies 64bit
> > unnecessarily.
> >
> > This is sort of like the change we saw when 32bit application complied
> > on 64bit: now every pointer becomes 64bit, hence enlarging memory
> > footprint, resident set size, thus sometimes slows down computation.
> >
> > I think people have been using int64 if they want 64 bit integer, and we
> > should use explicit int64 when we want 64bit integer (long long).
> 
> Go uses int as the size of objects, e.g., it is the return type of
> len, cap, and unsafe.Sizeof.  This is generally convenient and
> appropriate.  However, it means that on a 64-bit system with a 32-bit
> int it is impossible to have objects larger than 2G.  There are
> various different ways to address that.  Making int 64-bits solves the
> problem without requiring any new language concepts.  Since 64-bit
> machines have 64-bit registers, it costs little at runtime.
> 
> You're quite right that structures with int fields are now larger.
> This is notably true of slices and strings.  However, if you have
> structures for which the size matters, then I think it would have been
> appropriate to use int32 all along.  The language has always clearly
> stated that the int type can be 64 bits.
> 
> Ian
Sign in to reply to this message.

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