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

Issue 4008044: code review 4008044: arm register allocation/tempname allocation bug (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 5 months ago by ken3
Modified:
14 years, 5 months ago
Reviewers:
r2
CC:
r, golang-dev
Visibility:
Public.

Description

arm register allocation/tempname allocation bug

Patch Set 1 #

Patch Set 2 : code review 4008044: arm register allocation/tempname allocation bug #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -4 lines) Patch
M src/cmd/5g/cgen.c View 3 chunks +10 lines, -4 lines 0 comments Download

Messages

Total messages: 3
ken3
Hello r (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 5 months ago (2011-01-19 04:45:17 UTC) #1
ken3
*** Submitted as http://code.google.com/p/go/source/detail?r=8b44677ed38f *** arm register allocation/tempname allocation bug R=r CC=golang-dev http://codereview.appspot.com/4008044
14 years, 5 months ago (2011-01-19 04:45:23 UTC) #2
r2
14 years, 5 months ago (2011-01-19 04:48:21 UTC) #3
LGTM

On Jan 18, 2011, at 8:45 PM, ken@google.com wrote:

> Reviewers: r,
> 
> Message:
> Hello r (cc: golang-dev@googlegroups.com),
> 
> I'd like you to review this change.
> 
> 
> Description:
> arm register allocation/tempname allocation bug
> 
> Please review this at http://codereview.appspot.com/4008044/
> 
> Affected files:
>  M src/cmd/5g/cgen.c
> 
> 
> Index: src/cmd/5g/cgen.c
> ===================================================================
> --- a/src/cmd/5g/cgen.c
> +++ b/src/cmd/5g/cgen.c
> @@ -567,7 +567,8 @@
> 				regalloc(&n1, tmp.type, N);
> 				gmove(&tmp, &n1);
> 			}
> -		} else if(nl->addable) {
> +		} else
> +		if(nl->addable) {
> 			if(!isconst(nr, CTINT)) {
> 				tempname(&tmp, types[TINT32]);
> 				p2 = cgenindex(nr, &tmp);
> @@ -1092,11 +1093,17 @@
> 			break;
> 		}
> 
> +		tempname(&n3, nl->type);
> +		cgen(nl, &n3);
> +
> +		tempname(&tmp, nr->type);
> +		cgen(nr, &tmp);
> +
> 		regalloc(&n1, nl->type, N);
> -		cgen(nl, &n1);
> +		gmove(&n3, &n1);
> 
> 		regalloc(&n2, nr->type, N);
> -		cgen(nr, &n2);
> +		gmove(&tmp, &n2);
> 
> 		gcmp(optoas(OCMP, nr->type), &n1, &n2);
> 		if(isfloat[nl->type->etype]) {
> @@ -1109,7 +1116,6 @@
> 		} else {
> 			patch(gbranch(a, nr->type), to);
> 		}
> -
> 		regfree(&n1);
> 		regfree(&n2);
> 		break;
> 
> 

Sign in to reply to this message.

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