diff options
| author | Russ Cox <rsc@golang.org> | 2008-08-03 17:25:15 -0700 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2008-08-03 17:25:15 -0700 |
| commit | 9aad9fef76f49240a33f253e2db4e2de5c2f192f (patch) | |
| tree | 77abd882c6047963b22d61229dd95e9356208875 /src/cmd/6l/span.c | |
| parent | 851100683e6eecbf8f3f06db8aeb4748dc2bfc7a (diff) | |
| download | go-9aad9fef76f49240a33f253e2db4e2de5c2f192f.tar.xz | |
make 6a, 6c, 6g, 6l, libmach_amd64 build on 64-bit gcc.
these guys really really want long to be 32-bits,
so ,s/long/int32/ (and then manual fixup).
still passes all tests.
(i started out looking for just those longs that
needed to be int32 instead, and it was just too hard
to track them down one by one.)
the longs were rare enough that i don't think
it will cause integration problems.
R=ken
OCL=13787
CL=13789
Diffstat (limited to 'src/cmd/6l/span.c')
| -rw-r--r-- | src/cmd/6l/span.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/cmd/6l/span.c b/src/cmd/6l/span.c index 4b225da8ca..acb8f071d4 100644 --- a/src/cmd/6l/span.c +++ b/src/cmd/6l/span.c @@ -37,7 +37,7 @@ void span(void) { Prog *p, *q; - long v; + int32 v; vlong c, idat; int m, n, again; @@ -267,7 +267,7 @@ asmlc(void) { vlong oldpc; Prog *p; - long oldlc, v, s; + int32 oldlc, v, s; oldpc = INITTEXT; oldlc = 0; @@ -346,7 +346,7 @@ int oclass(Adr *a) { vlong v; - long l; + int32 l; if(a->type >= D_INDIR || a->index != D_NONE) { if(a->index != D_NONE && a->scale == 0) { @@ -623,7 +623,7 @@ bad: } static void -put4(long v) +put4(int32 v) { if(dlm && curp != P && reloca != nil){ dynreloc(reloca->sym, curp->pc + andptr - &and[0], 1); @@ -692,7 +692,7 @@ vaddr(Adr *a) static void asmandsz(Adr *a, int r, int rex, int m64) { - long v; + int32 v; int t; Adr aa; @@ -1638,7 +1638,7 @@ struct Reloc int n; int t; uchar *m; - ulong *a; + uint32 *a; }; Reloc rels; @@ -1648,26 +1648,26 @@ grow(Reloc *r) { int t; uchar *m, *nm; - ulong *a, *na; + uint32 *a, *na; t = r->t; r->t += 64; m = r->m; a = r->a; r->m = nm = malloc(r->t*sizeof(uchar)); - r->a = na = malloc(r->t*sizeof(ulong)); + r->a = na = malloc(r->t*sizeof(uint32)); memmove(nm, m, t*sizeof(uchar)); - memmove(na, a, t*sizeof(ulong)); + memmove(na, a, t*sizeof(uint32)); free(m); free(a); } void -dynreloc(Sym *s, ulong v, int abs) +dynreloc(Sym *s, uint32 v, int abs) { int i, k, n; uchar *m; - ulong *a; + uint32 *a; Reloc *r; if(s->type == SUNDEF) @@ -1712,7 +1712,7 @@ asmdyn() { int i, n, t, c; Sym *s; - ulong la, ra, *a; + uint32 la, ra, *a; vlong off; uchar *m; Reloc *r; |
