diff options
Diffstat (limited to 'src/cmd/8g/gsubr.c')
-rw-r--r-- | src/cmd/8g/gsubr.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/src/cmd/8g/gsubr.c b/src/cmd/8g/gsubr.c index 2f3cb28c8..3077e0ad9 100644 --- a/src/cmd/8g/gsubr.c +++ b/src/cmd/8g/gsubr.c @@ -31,14 +31,15 @@ #include <u.h> #include <libc.h> #include "gg.h" -#include "../../pkg/runtime/funcdata.h" +#include "../../runtime/funcdata.h" // TODO(rsc): Can make this bigger if we move // the text segment up higher in 8l for all GOOS. -// At the same time, can raise StackBig in ../../pkg/runtime/stack.h. +// At the same time, can raise StackBig in ../../runtime/stack.h. uint32 unmappedzero = 4096; #define CASE(a,b) (((a)<<16)|((b)<<0)) +/*c2go int CASE(int, int);*/ void clearp(Prog *p) @@ -205,17 +206,7 @@ ggloblnod(Node *nam) } void -gargsize(int32 size) -{ - Node n1, n2; - - nodconst(&n1, types[TINT32], PCDATA_ArgSize); - nodconst(&n2, types[TINT32], size); - gins(APCDATA, &n1, &n2); -} - -void -ggloblsym(Sym *s, int32 width, int dupok, int rodata) +ggloblsym(Sym *s, int32 width, int8 flags) { Prog *p; @@ -226,10 +217,7 @@ ggloblsym(Sym *s, int32 width, int dupok, int rodata) p->to.type = D_CONST; p->to.index = D_NONE; p->to.offset = width; - if(dupok) - p->from.scale |= DUPOK; - if(rodata) - p->from.scale |= RODATA; + p->from.scale = flags; } void @@ -432,7 +420,6 @@ optoas(int op, Type *t) case CASE(OADD, TINT32): case CASE(OADD, TUINT32): case CASE(OADD, TPTR32): - case CASE(OADDPTR, TPTR32): a = AADDL; break; @@ -697,6 +684,7 @@ optoas(int op, Type *t) } #define FCASE(a, b, c) (((a)<<16)|((b)<<8)|(c)) +/*c2go int FCASE(int, int, int); */ int foptoas(int op, Type *t, int flg) { @@ -950,7 +938,7 @@ regalloc(Node *n, Type *t, Node *o) fprint(2, "registers allocated at\n"); for(i=D_AX; i<=D_DI; i++) fprint(2, "\t%R\t%#lux\n", i, regpc[i]); - yyerror("out of fixed registers"); + fatal("out of fixed registers"); goto err; case TFLOAT32: |