summary refs log tree commit diff
path: root/amd64
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2022-12-18 17:35:19 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2022-12-25 16:37:33 +0100
commit5e9726946dcb9248dbd34ded1bdd4f7af8dc2d31 (patch)
tree9842f9837784911e386357af18b08a2ca1b69896 /amd64
parentc5cd65261e05029889450ca27050785504164853 (diff)
downloadroux-5e9726946dcb9248dbd34ded1bdd4f7af8dc2d31.tar.gz
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.
Diffstat (limited to 'amd64')
-rw-r--r--amd64/isel.c2
1 files changed, 1 insertions, 1 deletions
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)