w6a: drop chained-ptr-write workaround (c5f30f2 unblocked it)

This commit is contained in:
2026-05-11 22:35:01 +09:00
parent c5f30f2fce
commit 4ff63a0a40
3 changed files with 10 additions and 24 deletions

View File

@@ -354,13 +354,7 @@ fn addprog(a: *asm_, opc: i32, lbl: str) *aprog = {
pr.from = amalloc(a.a, 48u64): *aoperand;
pr.to = amalloc(a.a, 48u64): *aoperand;
if (a.head == nil) { a.head = pr; }
else {
// `a.tail.link = pr` would be a chained-dot write through a
// pointer field, which the C cgen we bootstrap on doesn't
// support (silently drops the store). Bind a local first.
let tail: *aprog = a.tail;
tail.link = pr;
};
else { a.tail.link = pr; };
a.tail = pr;
return pr;
};