]> Cypherpunks repositories - gostls13.git/commitdiff
generate float registers correctly.
authorKai Backman <kaib@golang.org>
Thu, 1 Oct 2009 20:52:55 +0000 (13:52 -0700)
committerKai Backman <kaib@golang.org>
Thu, 1 Oct 2009 20:52:55 +0000 (13:52 -0700)
go/test: passes 71% (242/339)

R=rsc
APPROVED=rsc
DELTA=9  (5 added, 0 deleted, 4 changed)
OCL=35233
CL=35243

src/cmd/5g/gsubr.c
test/arm-pass.txt

index dcd3840df05da8c8a9f7a3a907c9870422f43eb4..2f5bc1724c626a5709ef5625baecd122d30c2517 100644 (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:
-               a->type = D_REG;
-               if (n->val.u.reg <= REGALLOC_RMAX)
+               if (n->val.u.reg <= REGALLOC_RMAX) {
+                       a->type = D_REG;
                        a->reg = n->val.u.reg;
-               else
+               } else {
+                       a->type = D_FREG;
                        a->reg = n->val.u.reg - REGALLOC_F0;
+               }
                a->sym = S;
                break;
 
index ab77ea504e0d1bbd356df5a443f24477b302635e..789fbedea37260afc9a0db44fa261dff0afdb0be 100644 (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