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

Issue 6560054: code review 6560054: cmd/6g, cmd/8g: fix two "out of fixed registers" cases. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 7 months ago by remyoudompheng
Modified:
11 years, 7 months ago
Reviewers:
CC:
rsc, golang-dev, remy_archlinux.org
Visibility:
Public.

Description

cmd/6g, cmd/8g: fix two "out of fixed registers" cases. In two cases, registers were allocated too early resulting in exhausting of available registers when nesting these operations. The case of method calls was due to missing cases in igen, which only makes calls but doesn't allocate a register for the result. The case of 8-bit multiplication was due to a wrong order in register allocation when Ullman numbers were bigger on the RHS. Fixes issue 3907. Fixes issue 4156.

Patch Set 1 #

Patch Set 2 : diff -r 96fde1b15506 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 96fde1b15506 https://go.googlecode.com/hg/ #

Total comments: 4

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

Patch Set 5 : diff -r 599552ae08cd https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -71 lines) Patch
M src/cmd/6g/cgen.c View 1 2 chunks +18 lines, -5 lines 0 comments Download
M src/cmd/6g/ggen.c View 1 2 3 1 chunk +21 lines, -32 lines 0 comments Download
M src/cmd/8g/cgen.c View 1 1 chunk +13 lines, -1 line 0 comments Download
M src/cmd/8g/ggen.c View 1 2 3 1 chunk +23 lines, -33 lines 0 comments Download

Messages

Total messages: 3
remyoudompheng
Hello rsc@golang.org, golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com, remy@archlinux.org), I'd like you to review this change to https://go.googlecode.com/hg/
11 years, 7 months ago (2012-09-26 18:38:00 UTC) #1
rsc
LGTM http://codereview.appspot.com/6560054/diff/5001/src/cmd/6g/ggen.c File src/cmd/6g/ggen.c (right): http://codereview.appspot.com/6560054/diff/5001/src/cmd/6g/ggen.c#newcode1010 src/cmd/6g/ggen.c:1010: cgen(&n1, res); gmove please, just to emphasize that ...
11 years, 7 months ago (2012-09-26 18:56:15 UTC) #2
remyoudompheng
11 years, 7 months ago (2012-09-26 19:17:17 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=717a1620a7d8 ***

cmd/6g, cmd/8g: fix two "out of fixed registers" cases.

In two cases, registers were allocated too early resulting
in exhausting of available registers when nesting these
operations.

The case of method calls was due to missing cases in igen,
which only makes calls but doesn't allocate a register for
the result.

The case of 8-bit multiplication was due to a wrong order
in register allocation when Ullman numbers were bigger on the
RHS.

Fixes issue 3907.
Fixes issue 4156.

R=rsc
CC=golang-dev, remy
http://codereview.appspot.com/6560054

http://codereview.appspot.com/6560054/diff/5001/src/cmd/6g/ggen.c
File src/cmd/6g/ggen.c (right):

http://codereview.appspot.com/6560054/diff/5001/src/cmd/6g/ggen.c#newcode1010
src/cmd/6g/ggen.c:1010: cgen(&n1, res);
On 2012/09/26 18:56:15, rsc wrote:
> gmove please, just to emphasize that it's only a move.

Done.

http://codereview.appspot.com/6560054/diff/5001/src/cmd/8g/ggen.c
File src/cmd/8g/ggen.c (right):

http://codereview.appspot.com/6560054/diff/5001/src/cmd/8g/ggen.c#newcode775
src/cmd/8g/ggen.c:775: cgen(&n1, res);
On 2012/09/26 18:56:15, rsc wrote:
> gmove

Done.
Sign in to reply to this message.

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