summaryrefslogtreecommitdiff
path: root/src/liblink/asm5.c
diff options
context:
space:
mode:
authorShenghou Ma <minux@golang.org>2014-08-06 00:31:22 -0400
committerShenghou Ma <minux@golang.org>2014-08-06 00:31:22 -0400
commit25cf0bae06d25dd858f86ff152215d72c57be6a7 (patch)
tree1a75f71ac2aebfa0388d361c28159b129e1881cd /src/liblink/asm5.c
parent849ee80bb4964f407e83bea63d932c399d38ab64 (diff)
downloadgo-25cf0bae06d25dd858f86ff152215d72c57be6a7.tar.gz
liblink, cmd/dist, cmd/5l: introduce %^ and move C_* constants.
The helps certain diagnostics and also removed duplicated enums as a side effect. LGTM=dave, rsc R=rsc, dave CC=golang-codereviews https://codereview.appspot.com/115060044
Diffstat (limited to 'src/liblink/asm5.c')
-rw-r--r--src/liblink/asm5.c50
1 files changed, 2 insertions, 48 deletions
diff --git a/src/liblink/asm5.c b/src/liblink/asm5.c
index 73a31862f..46aa1c1e3 100644
--- a/src/liblink/asm5.c
+++ b/src/liblink/asm5.c
@@ -65,52 +65,6 @@ enum
LTO = 1<<1,
LPOOL = 1<<2,
LPCREL = 1<<3,
-
- C_NONE = 0,
- C_REG,
- C_REGREG,
- C_REGREG2,
- C_SHIFT,
- C_FREG,
- C_PSR,
- C_FCR,
-
- C_RCON, /* 0xff rotated */
- C_NCON, /* ~RCON */
- C_SCON, /* 0xffff */
- C_LCON,
- C_LCONADDR,
- C_ZFCON,
- C_SFCON,
- C_LFCON,
-
- C_RACON,
- C_LACON,
-
- C_SBRA,
- C_LBRA,
-
- C_HAUTO, /* halfword insn offset (-0xff to 0xff) */
- C_FAUTO, /* float insn offset (0 to 0x3fc, word aligned) */
- C_HFAUTO, /* both H and F */
- C_SAUTO, /* -0xfff to 0xfff */
- C_LAUTO,
-
- C_HOREG,
- C_FOREG,
- C_HFOREG,
- C_SOREG,
- C_ROREG,
- C_SROREG, /* both nil and R */
- C_LOREG,
-
- C_PC,
- C_SP,
- C_HREG,
-
- C_ADDR, /* reference to relocatable address */
-
- C_GOK,
};
static Optab optab[] =
@@ -1264,7 +1218,7 @@ oplook(Link *ctxt, Prog *p)
o = oprange[r].stop; /* just generate an error */
}
if(0 /*debug['O']*/) {
- print("oplook %A %d %d %d\n",
+ print("oplook %A %^ %^ %^\n",
(int)p->as, a1, a2, a3);
print(" %d %d\n", p->from.type, p->to.type);
}
@@ -1278,7 +1232,7 @@ oplook(Link *ctxt, Prog *p)
p->optab = (o-optab)+1;
return o;
}
- ctxt->diag("illegal combination %P; %d %d %d, %d %d",
+ ctxt->diag("illegal combination %P; %^ %^ %^, %d %d",
p, a1, a2, a3, p->from.type, p->to.type);
ctxt->diag("from %d %d to %d %d\n", p->from.type, p->from.name, p->to.type, p->to.name);
prasm(p);