mirror of
https://github.com/golang/go
synced 2024-11-25 23:07: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:
parent
e67a5084b8
commit
399d23d4f4
@ -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 {
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user