summaryrefslogtreecommitdiff
path: root/src/cmd/5g/gsubr.c
diff options
context:
space:
mode:
authorTianon Gravi <admwiggin@gmail.com>2015-01-15 11:54:00 -0700
committerTianon Gravi <admwiggin@gmail.com>2015-01-15 11:54:00 -0700
commitf154da9e12608589e8d5f0508f908a0c3e88a1bb (patch)
treef8255d51e10c6f1e0ed69702200b966c9556a431 /src/cmd/5g/gsubr.c
parent8d8329ed5dfb9622c82a9fbec6fd99a580f9c9f6 (diff)
downloadgolang-f154da9e12608589e8d5f0508f908a0c3e88a1bb.tar.gz
Imported Upstream version 1.4upstream/1.4
Diffstat (limited to 'src/cmd/5g/gsubr.c')
-rw-r--r--src/cmd/5g/gsubr.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/src/cmd/5g/gsubr.c b/src/cmd/5g/gsubr.c
index f66c87b5a..06e274e14 100644
--- a/src/cmd/5g/gsubr.c
+++ b/src/cmd/5g/gsubr.c
@@ -31,11 +31,11 @@
#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 5l 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.
long unmappedzero = 4096;
void
@@ -206,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;
@@ -227,10 +217,7 @@ ggloblsym(Sym *s, int32 width, int dupok, int rodata)
p->to.type = D_CONST;
p->to.name = D_NONE;
p->to.offset = width;
- if(dupok)
- p->reg |= DUPOK;
- if(rodata)
- p->reg |= RODATA;
+ p->reg = flags;
}
void
@@ -374,7 +361,7 @@ regalloc(Node *n, Type *t, Node *o)
print("registers allocated at\n");
for(i=REGALLOC_R0; i<=REGALLOC_RMAX; i++)
print("%d %p\n", i, regpc[i]);
- yyerror("out of fixed registers");
+ fatal("out of fixed registers");
goto err;
case TFLOAT32:
@@ -387,7 +374,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 point registers");
+ fatal("out of floating point registers");
goto err;
case TCOMPLEX64:
@@ -636,6 +623,7 @@ splitclean(void)
}
#define CASE(a,b) (((a)<<16)|((b)<<0))
+/*c2go int CASE(int, int); */
void
gmove(Node *f, Node *t)
@@ -1601,7 +1589,6 @@ optoas(int op, Type *t)
case CASE(OADD, TINT32):
case CASE(OADD, TUINT32):
case CASE(OADD, TPTR32):
- case CASE(OADDPTR, TPTR32):
a = AADD;
break;