diff options
| author | Russ Cox <rsc@golang.org> | 2015-01-29 23:35:14 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2015-02-04 16:50:06 +0000 |
| commit | 1f2d7bf44fd20d06c21d16df485fa17137fe79f6 (patch) | |
| tree | c94e9493475cd1d6bafb92cecffe02c9b64757ac /src/liblink/asm5.c | |
| parent | 3e9ed273a244da5d96472656af911a6d2714a9e8 (diff) | |
| download | go-1f2d7bf44fd20d06c21d16df485fa17137fe79f6.tar.xz | |
liblink: require use of TYPE_ADDR, not TYPE_CONST
Add Addr-checking for all Progs on input to liblink, in liblink/pass.c,
including requiring use of TYPE_ADDR, not TYPE_CONST.
Update compilers and assemblers to satisfy checks.
Change-Id: Idac36b9f6805f0451cb541d2338992ca5eaf3963
Reviewed-on: https://go-review.googlesource.com/3801
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/liblink/asm5.c')
| -rw-r--r-- | src/liblink/asm5.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/liblink/asm5.c b/src/liblink/asm5.c index 5be4a87d7d..8d597750b7 100644 --- a/src/liblink/asm5.c +++ b/src/liblink/asm5.c @@ -588,7 +588,7 @@ asmoutnacl(Link *ctxt, int32 origPC, Prog *p, Optab *o, uint32 *out) // make p into MOVW $X(R), R11 p->as = AMOVW; p->from = *a; - p->from.type = TYPE_CONST; + p->from.type = TYPE_ADDR; p->to = zprog.to; p->to.type = TYPE_REG; p->to.reg = REG_R11; @@ -1125,6 +1125,7 @@ aclass(Link *ctxt, Addr *a) return C_TEXTSIZE; case TYPE_CONST: + case TYPE_ADDR: switch(a->name) { case TYPE_NONE: |
