From: Russ Cox Date: Mon, 25 Oct 2010 23:26:33 +0000 (+0200) Subject: 5g: complex "regalloc" X-Git-Tag: weekly.2010-10-27~30 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b0ad7a42686bd75a7276f03dac084f907d59f83c;p=gostls13.git 5g: complex "regalloc" R=ken2 CC=golang-dev https://golang.org/cl/2727041 --- diff --git a/src/cmd/5g/gsubr.c b/src/cmd/5g/gsubr.c index 3b68ac1bc2..7089b71850 100644 --- a/src/cmd/5g/gsubr.c +++ b/src/cmd/5g/gsubr.c @@ -305,6 +305,11 @@ regalloc(Node *n, Type *t, Node *o) goto out; yyerror("out of floating point registers"); goto err; + + case TCOMPLEX64: + case TCOMPLEX128: + tempname(n, t); + return; } yyerror("regalloc: unknown type %T", t); @@ -334,6 +339,8 @@ regfree(Node *n) print("regalloc fix %d float %d\n", fixfree, floatfree); } + if(n->op == ONAME && iscomplex[n->type->etype]) + return; if(n->op != OREGISTER && n->op != OINDREG) fatal("regfree: not a register"); i = n->val.u.reg;