summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-12 13:00:16 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-04-12 13:00:16 -0400
commit5c3c410c60c42eeb42f8b7c4aa578d80567dac16 (patch)
tree53b2090a27720d4ade3aad50f119e8f238309fc3
parent60feaba8c59e82c278e6cd20be08b1e61b8c1460 (diff)
downloadroux-5c3c410c60c42eeb42f8b7c4aa578d80567dac16.tar.gz
both comparison arguments need to be fixed
The second argument will not be a constant because
of the assertion.  But it could be a fast local, and
this situation needs to be handled by the last case
of fixarg().
-rw-r--r--isel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/isel.c b/isel.c
index 80a3e6c..fa5b617 100644
--- a/isel.c
+++ b/isel.c
@@ -192,6 +192,7 @@ selcmp(Ref arg[2], int k, Fn *fn)
 	assert(rtype(arg[0]) != RCon);
 	emit(OXCmp, k, R, arg[1], arg[0]);
 	fixarg(&curi->arg[0], k, 0, fn);
+	fixarg(&curi->arg[1], k, 0, fn);
 }
 
 static void