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:
parent
4f81684f86
commit
f45fd5753c
@ -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);
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user