diff --git a/src/cmd/5g/gsubr.c b/src/cmd/5g/gsubr.c index 3b68ac1bc27..7089b71850d 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;