From 5e9726946dcb9248dbd34ded1bdd4f7af8dc2d31 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Sun, 18 Dec 2022 17:35:19 +0100 Subject: new UNDEF Ref Crashing loads of uninitialized memory proved to be a problem when implementing unions using qbe. This patch introduces a new UNDEF Ref to represent data that is known to be uninitialized. Optimization passes can make use of it to eliminate some code. In the last compilation stages, UNDEF is treated as the constant 0xdeaddead. --- amd64/isel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'amd64') diff --git a/amd64/isel.c b/amd64/isel.c index 6d62275..3e3fe62 100644 --- a/amd64/isel.c +++ b/amd64/isel.c @@ -482,7 +482,7 @@ seljmp(Blk *b, Fn *fn) } fi = flagi(b->ins, &b->ins[b->nins]); if (!fi || !req(fi->to, r)) { - selcmp((Ref[2]){r, CON_Z}, Kw, 0, fn); /* todo, long jnz */ + selcmp((Ref[2]){r, CON_Z}, Kw, 0, fn); b->jmp.type = Jjf + Cine; } else if (iscmp(fi->op, &k, &c) -- cgit 1.4.1