summary refs log tree commit diff
path: root/load.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2019-03-12 20:53:18 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2019-03-12 20:53:18 +0100
commitfd65f4275be6dc6603be9610e88c55b8bfc1dc62 (patch)
tree95c8ecd45f90c9cf971e010ed63f1d2ad739f650 /load.c
parentc37347a4630fda601b4c40585ca25fff42f756c6 (diff)
downloadroux-fd65f4275be6dc6603be9610e88c55b8bfc1dc62.tar.gz
improve range-checking macros
They are now linear and can be
safely used with arguments that
have side-effects. This patch
also introduces an iscall()
macro and uses it to fix a
missing check for Ovacall in
liveness analysis.
Diffstat (limited to 'load.c')
-rw-r--r--load.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/load.c b/load.c
index 8e1328e..c8471f6 100644
--- a/load.c
+++ b/load.c
@@ -231,7 +231,7 @@ def(Slice sl, bits msk, Blk *b, Ins *i, Loc *il)
 	while (i > b->ins) {
 		--i;
 		if (killsl(i->to, sl)
-		|| ((i->op == Ocall || i->op == Ovacall) && escapes(sl.ref, curf)))
+		|| (iscall(i->op) && escapes(sl.ref, curf)))
 			goto Load;
 		ld = isload(i->op);
 		if (ld) {