summary refs log tree commit diff
path: root/live.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 /live.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 'live.c')
-rw-r--r--live.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/live.c b/live.c
index 4198995..c22e063 100644
--- a/live.c
+++ b/live.c
@@ -82,7 +82,7 @@ Again:
 		for (k=0; k<2; k++)
 			b->nlive[k] = nlv[k];
 		for (i=&b->ins[b->nins]; i!=b->ins;) {
-			if ((--i)->op == Ocall && rtype(i->arg[1]) == RCall) {
+			if (iscall((--i)->op) && rtype(i->arg[1]) == RCall) {
 				b->in->t[0] &= ~T.retregs(i->arg[1], m);
 				for (k=0; k<2; k++) {
 					nlv[k] -= m[k];