1
0
mirror of https://github.com/golang/go synced 2024-11-19 13:04:45 -07:00

[dev.power64] gc: fix etype of strings

The etype of references to strings was being incorrectly set
to TINT32 on all platforms.  Change it to TSTRING.  It seems
this doesn't matter for compilation, since x86 uses LEA
instructions to load string addresses and arm and power64
disassemble the string into its constituent pieces (with the
correct types), but it helps when debugging.

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/170100043
This commit is contained in:
Austin Clements 2014-11-06 14:37:39 -05:00
parent 4f81684f86
commit f45fd5753c
4 changed files with 4 additions and 4 deletions

View File

@ -86,7 +86,7 @@ datagostring(Strlit *sval, Addr *a)
sym = stringsym(sval->s, sval->len); sym = stringsym(sval->s, sval->len);
a->type = D_OREG; a->type = D_OREG;
a->name = D_EXTERN; a->name = D_EXTERN;
a->etype = TINT32; a->etype = TSTRING;
a->offset = 0; // header a->offset = 0; // header
a->reg = NREG; a->reg = NREG;
a->sym = linksym(sym); a->sym = linksym(sym);

View File

@ -81,7 +81,7 @@ datagostring(Strlit *sval, Addr *a)
a->sym = linksym(sym); a->sym = linksym(sym);
a->node = sym->def; a->node = sym->def;
a->offset = 0; // header a->offset = 0; // header
a->etype = TINT32; a->etype = TSTRING;
} }
void void

View File

@ -81,7 +81,7 @@ datagostring(Strlit *sval, Addr *a)
a->sym = linksym(sym); a->sym = linksym(sym);
a->node = sym->def; a->node = sym->def;
a->offset = 0; // header a->offset = 0; // header
a->etype = TINT32; a->etype = TSTRING;
} }
void void

View File

@ -89,7 +89,7 @@ datagostring(Strlit *sval, Addr *a)
a->reg = NREG; a->reg = NREG;
a->node = sym->def; a->node = sym->def;
a->offset = 0; // header a->offset = 0; // header
a->etype = TINT32; a->etype = TSTRING;
} }
void void