diff options
author | Kai Backman <kaib@golang.org> | 2009-06-09 20:51:53 -0700 |
---|---|---|
committer | Kai Backman <kaib@golang.org> | 2009-06-09 20:51:53 -0700 |
commit | d2c5434a18b33629e2e0f71c93dafd58e36d7f37 (patch) | |
tree | 54a2d789500922c795feb6c3e98df36a3561132d /src/cmd/5l/asm.c | |
parent | 057939112b97219654df80be4ca6854d9520fd52 (diff) | |
download | golang-d2c5434a18b33629e2e0f71c93dafd58e36d7f37.tar.gz |
Added ld/go.c functionality into 5l, primarily dead code
removal and typesigs and strings.
Also added new header support to 5c/5a/5l.
R=rsc
APPROVED=rsc
DELTA=98 (66 added, 10 deleted, 22 changed)
OCL=30103
CL=30123
Diffstat (limited to 'src/cmd/5l/asm.c')
-rw-r--r-- | src/cmd/5l/asm.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/cmd/5l/asm.c b/src/cmd/5l/asm.c index f0f3185a4..204100941 100644 --- a/src/cmd/5l/asm.c +++ b/src/cmd/5l/asm.c @@ -943,6 +943,16 @@ datblk(int32 s, int32 n, int str) break; } break; + + case D_SBIG: + if(debug['a'] && i == 0) { + Bprint(&bso, "\t%P\n", curp); + } + for(; i<c; i++) { + buf.dbuf[l] = p->to.sbig[i]; + l++; + } + break; } } write(cout, buf.dbuf, n); @@ -1311,7 +1321,7 @@ if(debug['G']) print("%ulx: %s: arm %d %d %d %d\n", (uint32)(p->pc), p->from.sym o6 |= (1<<6); /* ROL 8 */ break; - + case 34: /* mov $lacon,R */ o1 = omvl(p, &p->from, REGTMP); if(!o1) @@ -1617,7 +1627,7 @@ if(debug['G']) print("%ulx: %s: arm %d %d %d %d\n", (uint32)(p->pc), p->from.sym if(r == NREG) r = o->param; o1 = oshr(p->from.reg, instoffset, r, p->scond); - break; + break; case 71: /* movb/movh/movhu O(R),R -> ldrsb/ldrsh/ldrh */ aclass(&p->from); r = p->from.reg; @@ -1637,7 +1647,7 @@ if(debug['G']) print("%ulx: %s: arm %d %d %d %d\n", (uint32)(p->pc), p->from.sym if(r == NREG) r = o->param; o2 = oshrr(p->from.reg, REGTMP,r, p->scond); - break; + break; case 73: /* movb/movh/movhu L(R),R -> ldrsb/ldrsh/ldrh */ o1 = omvl(p, &p->from, REGTMP); if(!o1) @@ -1922,7 +1932,7 @@ oshr(int r, int32 v, int b, int sc) o = olhr(v, b, r, sc) ^ (1<<20); return o; } - + int32 osrr(int r, int i, int b, int sc) @@ -1989,7 +1999,7 @@ ofsr(int a, int r, int32 v, int b, int sc, Prog *p) int32 omvl(Prog *p, Adr *a, int dr) -{ +{ int32 v, o1; if(!p->cond) { aclass(a); |