summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-07 12:07:22 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-03-07 12:07:34 -0500
commit005c7e7c5e3bc3a7095f41ea4527e6f801739f51 (patch)
treea3d9b7e805e6cfbfeab6c6ea18c5346b2ee3c7e7
parent53efd935d77409517f0c9f268aa384eae277a588 (diff)
downloadroux-005c7e7c5e3bc3a7095f41ea4527e6f801739f51.tar.gz
fix two bad bugs in abi classification
The conditions to put a struct in memory or
not were wrong.  And I misused the cls field
of the AClass struct.
-rw-r--r--lisc/isel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisc/isel.c b/lisc/isel.c
index 73d4c21..6a6f0f4 100644
--- a/lisc/isel.c
+++ b/lisc/isel.c
@@ -530,11 +530,11 @@ classify(Ins *i0, Ins *i1, AClass *ac, int op)
 				continue;
 			ni = ns = 0;
 			for (n=0; n<2; n++)
-				if (a->cls[n] == 0)
+				if (KBASE(a->cls[n]) == 0)
 					ni++;
 				else
 					ns++;
-			if (nint > ni && nsse > ns) {
+			if (nint >= ni && nsse >= ns) {
 				nint -= ni;
 				nsse -= ns;
 			} else