]> Cypherpunks repositories - gostls13.git/commit
liblink: place TEXT/GLOBL flags in p->from3 always
authorRuss Cox <rsc@golang.org>
Thu, 29 Jan 2015 19:58:54 +0000 (14:58 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 3 Feb 2015 18:22:15 +0000 (18:22 +0000)
commit77a415e5a698e8f897aed8aa64db6855b8f952fc
treea2adb923b983adfd5301f0d87c9c26949e22d9d6
parent72521319c733e5de62bb837508ea9fa2b1f3a0a2
liblink: place TEXT/GLOBL flags in p->from3 always

Before, amd64 and 386 stored the flags in p->from.scale
and arm and ppc64 stored the flags in p->reg.
Both caused special cases in printing and in handling of the
addresses.

To avoid possible conflicts with the real meaning of p->from
and to avoid storing a non-register value in a reg field,
use from3 to hold a TYPE_CONST value giving the flags.

There is still a special case for printing, because the flags
are specified without a $, and normally a TYPE_CONST prints
with a $. But that's much less special than what came before.

This allows us to remove the textflag and settextflag methods
from LinkArch. They are no longer architecture-specific.

Change-Id: I931da8e1ecd92e127cd9aa44ef5a73c42e730110
Reviewed-on: https://go-review.googlesource.com/3572
Reviewed-by: Austin Clements <austin@google.com>
37 files changed:
include/link.h
src/cmd/5a/a.h
src/cmd/5a/a.y
src/cmd/5a/lex.c
src/cmd/5a/y.tab.c
src/cmd/5g/gg.h
src/cmd/5g/gsubr.c
src/cmd/6a/a.h
src/cmd/6a/a.y
src/cmd/6a/lex.c
src/cmd/6a/y.tab.c
src/cmd/6g/gg.h
src/cmd/6g/gsubr.c
src/cmd/8a/a.h
src/cmd/8a/a.y
src/cmd/8a/lex.c
src/cmd/8a/y.tab.c
src/cmd/8g/gg.h
src/cmd/8g/gsubr.c
src/cmd/9a/a.h
src/cmd/9a/a.y
src/cmd/9a/lex.c
src/cmd/9a/y.tab.c
src/cmd/9g/gg.h
src/cmd/9g/gsubr.c
src/cmd/gc/pgen.c
src/liblink/asm5.c
src/liblink/asm9.c
src/liblink/list5.c
src/liblink/list6.c
src/liblink/list8.c
src/liblink/list9.c
src/liblink/obj5.c
src/liblink/obj6.c
src/liblink/obj8.c
src/liblink/obj9.c
src/liblink/objfile.c