1
0
mirror of https://github.com/golang/go synced 2024-11-25 11:07:59 -07:00

generate float registers correctly.

go/test: passes 71% (242/339)

R=rsc
APPROVED=rsc
DELTA=9  (5 added, 0 deleted, 4 changed)
OCL=35233
CL=35243
This commit is contained in:
Kai Backman 2009-10-01 13:52:55 -07:00
parent e5c884f7db
commit 57f834aeff
2 changed files with 9 additions and 4 deletions

View File

@ -242,7 +242,7 @@ regalloc(Node *n, Type *t, Node *o)
for(i=REGALLOC_F0; i<=REGALLOC_FMAX; i++)
if(reg[i] == 0)
goto out;
yyerror("out of floating registers");
yyerror("out of floating point registers");
goto err;
}
yyerror("regalloc: unknown type %T", t);
@ -939,11 +939,13 @@ naddr(Node *n, Addr *a)
break;
case OREGISTER:
if (n->val.u.reg <= REGALLOC_RMAX) {
a->type = D_REG;
if (n->val.u.reg <= REGALLOC_RMAX)
a->reg = n->val.u.reg;
else
} else {
a->type = D_FREG;
a->reg = n->val.u.reg - REGALLOC_F0;
}
a->sym = S;
break;

View File

@ -14,11 +14,13 @@ cmp3.go
cmp4.go
cmp5.go
compos.go
const.go
const1.go
const2.go
convert3.go
convlit.go
convlit1.go
decl.go
declbad.go
empty.go
escape1.go
@ -59,6 +61,7 @@ fixedbugs/bug050.go
fixedbugs/bug051.go
fixedbugs/bug052.go
fixedbugs/bug053.go
fixedbugs/bug056.go
fixedbugs/bug057.go
fixedbugs/bug058.go
fixedbugs/bug061.go