From b8b95a99dfd736e8b49169ff03050f89ada286c8 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Tue, 28 Apr 2026 16:23:47 +0200 Subject: [PATCH] asserts in emitcon() --- amd64/emit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/amd64/emit.c b/amd64/emit.c index a21400e..b48c31e 100644 --- a/amd64/emit.c +++ b/amd64/emit.c @@ -195,11 +195,13 @@ emitcon(Con *con, E *e) case CAddr: l = str(con->sym.id); p = l[0] == '"' ? "" : T.assym; - if (con->sym.type & SThr) { + if (con->sym.type == SThr) { assert(!T.apple); fprintf(e->f, "%%fs:%s%s@tpoff", p, l); - } else + } else { + assert(con->sym.type == SGlo); fprintf(e->f, "%s%s", p, l); + } if (con->bits.i) fprintf(e->f, "%+"PRId64, con->bits.i); break;