diff options
author | Kai Backman <kaib@golang.org> | 2009-03-25 16:31:38 -0700 |
---|---|---|
committer | Kai Backman <kaib@golang.org> | 2009-03-25 16:31:38 -0700 |
commit | 95207c8d8eda9ff909cd5ca6bbef053a6ce4bc92 (patch) | |
tree | 7191f3ca8fa4916312747c406979c1a9c420eba6 /src/cmd/5c/txt.c | |
parent | 1a0719d5b94224238cf1b68c754a4f45ccdf8c5e (diff) | |
download | golang-95207c8d8eda9ff909cd5ca6bbef053a6ce4bc92.tar.gz |
This is really two changes in one but given interdependencies
and expected review latency I needed to combine the CLs.
1. Made the 5* toolpath build using the go build
system. Hooked the subdirectories to clean.bash but added a
separate make5.bash for now. Minor massage to make the code
more similar to the current structure of 6c/6a/6l.
2. Change all references from long to int32 in line with
similar change for the other toolchains.
The end result is that 5c, 5a and 5l can now be compiled and
the executables start up properly. Haven't thrown any input at
them yet.
R=rsc
APPROVED=rsc
DELTA=1052 (392 added, 328 deleted, 332 changed)
OCL=26757
CL=26761
Diffstat (limited to 'src/cmd/5c/txt.c')
-rw-r--r-- | src/cmd/5c/txt.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cmd/5c/txt.c b/src/cmd/5c/txt.c index 319f65627..882484f48 100644 --- a/src/cmd/5c/txt.c +++ b/src/cmd/5c/txt.c @@ -165,7 +165,7 @@ nextpc(void) void gargs(Node *n, Node *tn1, Node *tn2) { - long regs; + int32 regs; Node fnxargs[20], *fnxp; regs = cursafe; @@ -235,7 +235,7 @@ garg1(Node *n, Node *tn1, Node *tn2, int f, Node **fnxp) } Node* -nodconst(long v) +nodconst(int32 v) { constnode.vconst = v; return &constnode; @@ -455,7 +455,7 @@ raddr(Node *n, Prog *p) void naddr(Node *n, Adr *a) { - long v; + int32 v; a->type = D_NONE; if(n == Z) @@ -1148,7 +1148,7 @@ gbranch(int o) } void -patch(Prog *op, long pc) +patch(Prog *op, int32 pc) { op->to.offset = pc; @@ -1165,7 +1165,7 @@ gpseudo(int a, Sym *s, Node *n) p->from.sym = s; p->from.name = D_EXTERN; if(a == ATEXT) - p->reg = (profileflg ? 0 : NOPROF); + p->reg = textflag; if(s->class == CSTATIC) p->from.name = D_STATIC; naddr(n, &p->to); @@ -1195,7 +1195,7 @@ sconst(Node *n) } int -sval(long v) +sval(int32 v) { int i; @@ -1204,15 +1204,15 @@ sval(long v) return 1; if((~v & ~0xff) == 0) return 1; - v = (v<<2) | ((ulong)v>>30); + v = (v<<2) | ((uint32)v>>30); } return 0; } -long +int32 exreg(Type *t) { - long o; + int32 o; if(typechlp[t->etype]) { if(exregoffset <= REGEXT-4) @@ -1255,7 +1255,7 @@ schar ewidth[NTYPE] = SZ_INT, /* [TENUM] */ }; -long ncast[NTYPE] = +int32 ncast[NTYPE] = { 0, /* [TXXX] */ BCHAR|BUCHAR, /* [TCHAR] */ |