wwstage: name vararg-gather slots via mklabel; graduate fmt 777/780/781 (#227)
wwstage named variadic-gather slots with mkvarargname off a separate varargseq counter, never bumping the shared labelseq that names match labels. cstage names them via mklabel (cmd/w6c/cgen.c:5427,5431), which advances labelseq twice per gather. So by the time main.main reached its `match (wr)`, wwstage's match-label counter ran two behind cstage's (_4/_5/_6 vs _6/_7/_8) — a pure label-numbering divergence that kept fmt cs/ww byte-id failing. Drop varargseq and the mkvarargname helper; call the existing mklabel for the two gather slots, matching cstage's order (vararg_d only when nvar>0, vararg_sl always). The slot names are locals-table keys only — they resolve to BP offsets and never reach the asm — so only the labelseq advance is observable, which is exactly what realigns the downstream match labels. cstage untouched (align wwstage up). This was the match-label half of fmt's divergence; with the earlier compound-assign fix it completes fmt byte-identity. Graduate 777/780/781 to STAGE_CS|STAGE_WW with byte_id, and drop the now-stale (void)asm_byte_identical guard in 777.
This commit is contained in:
@@ -115,7 +115,7 @@ static const struct row rows[] = {
|
||||
" return 50;\n"
|
||||
"};\n",
|
||||
50,
|
||||
STAGE_CS, 0 },
|
||||
STAGE_CS | STAGE_WW, 1 },
|
||||
{ "precision",
|
||||
"package main;\n"
|
||||
"import os;\n"
|
||||
@@ -143,7 +143,7 @@ static const struct row rows[] = {
|
||||
" return 51;\n"
|
||||
"};\n",
|
||||
51,
|
||||
STAGE_CS, 0 },
|
||||
STAGE_CS | STAGE_WW, 1 },
|
||||
{ "base_hex",
|
||||
"package main;\n"
|
||||
"import os;\n"
|
||||
@@ -171,7 +171,7 @@ static const struct row rows[] = {
|
||||
" return 52;\n"
|
||||
"};\n",
|
||||
52,
|
||||
STAGE_CS, 0 },
|
||||
STAGE_CS | STAGE_WW, 1 },
|
||||
{ "sign_plus",
|
||||
"package main;\n"
|
||||
"import os;\n"
|
||||
@@ -199,7 +199,7 @@ static const struct row rows[] = {
|
||||
" return 53;\n"
|
||||
"};\n",
|
||||
53,
|
||||
STAGE_CS, 0 },
|
||||
STAGE_CS | STAGE_WW, 1 },
|
||||
{ "zero_pad",
|
||||
"package main;\n"
|
||||
"import os;\n"
|
||||
@@ -227,7 +227,7 @@ static const struct row rows[] = {
|
||||
" return 54;\n"
|
||||
"};\n",
|
||||
54,
|
||||
STAGE_CS, 0 },
|
||||
STAGE_CS | STAGE_WW, 1 },
|
||||
};
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user