1
0
mirror of https://github.com/golang/go synced 2024-11-26 01:37:58 -07:00

load binary op arguments into registers

go/test: passes 69% (237/339)

R=rsc
APPROVED=rsc
DELTA=12  (3 added, 9 deleted, 0 changed)
OCL=35178
CL=35180
This commit is contained in:
Kai Backman 2009-09-30 14:28:18 -07:00
parent e67a5084b8
commit 399d23d4f4
2 changed files with 3 additions and 9 deletions

View File

@ -364,18 +364,10 @@ sbop: // symmetric binary
} }
abop: // asymmetric binary abop: // asymmetric binary
// TODO(kaib): use fewer registers here.
if(nl->ullman >= nr->ullman) { if(nl->ullman >= nr->ullman) {
regalloc(&n1, nl->type, res); regalloc(&n1, nl->type, res);
cgen(nl, &n1); cgen(nl, &n1);
if(sudoaddable(a, nr, &addr, &w)) {
p1 = gins(a, N, &n1);
p1->from = addr;
gmove(&n1, res);
sudoclean();
regfree(&n1);
goto ret;
}
regalloc(&n2, nr->type, N); regalloc(&n2, nr->type, N);
cgen(nr, &n2); cgen(nr, &n2);
} else { } else {

View File

@ -213,6 +213,7 @@ ken/complit.go
ken/for.go ken/for.go
ken/label.go ken/label.go
ken/mfunc.go ken/mfunc.go
ken/ptrvar.go
ken/rob2.go ken/rob2.go
ken/robfor.go ken/robfor.go
ken/robif.go ken/robif.go
@ -221,6 +222,7 @@ ken/simpfun.go
ken/simpprint.go ken/simpprint.go
ken/simpswitch.go ken/simpswitch.go
ken/simpvar.go ken/simpvar.go
ken/strvar.go
method1.go method1.go
method2.go method2.go
method3.go method3.go