Commit c1c5d479 authored by Russ Cox's avatar Russ Cox

cmd/5g, cmd/8g: make 'out of registers' a fatal error

There's no point in continuing. We will only get confused.
6g already makes this fatal.

LGTM=dave, minux, iant
R=iant, dave, minux
CC=golang-codereviews
https://golang.org/cl/140660043
parent 99e8f404
...@@ -361,7 +361,7 @@ regalloc(Node *n, Type *t, Node *o) ...@@ -361,7 +361,7 @@ regalloc(Node *n, Type *t, Node *o)
print("registers allocated at\n"); print("registers allocated at\n");
for(i=REGALLOC_R0; i<=REGALLOC_RMAX; i++) for(i=REGALLOC_R0; i<=REGALLOC_RMAX; i++)
print("%d %p\n", i, regpc[i]); print("%d %p\n", i, regpc[i]);
yyerror("out of fixed registers"); fatal("out of fixed registers");
goto err; goto err;
case TFLOAT32: case TFLOAT32:
...@@ -374,7 +374,7 @@ regalloc(Node *n, Type *t, Node *o) ...@@ -374,7 +374,7 @@ regalloc(Node *n, Type *t, Node *o)
for(i=REGALLOC_F0; i<=REGALLOC_FMAX; i++) for(i=REGALLOC_F0; i<=REGALLOC_FMAX; i++)
if(reg[i] == 0) if(reg[i] == 0)
goto out; goto out;
yyerror("out of floating point registers"); fatal("out of floating point registers");
goto err; goto err;
case TCOMPLEX64: case TCOMPLEX64:
......
...@@ -938,7 +938,7 @@ regalloc(Node *n, Type *t, Node *o) ...@@ -938,7 +938,7 @@ regalloc(Node *n, Type *t, Node *o)
fprint(2, "registers allocated at\n"); fprint(2, "registers allocated at\n");
for(i=D_AX; i<=D_DI; i++) for(i=D_AX; i<=D_DI; i++)
fprint(2, "\t%R\t%#lux\n", i, regpc[i]); fprint(2, "\t%R\t%#lux\n", i, regpc[i]);
yyerror("out of fixed registers"); fatal("out of fixed registers");
goto err; goto err;
case TFLOAT32: case TFLOAT32:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment