summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-10-25 15:18:42 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-10-30 13:20:42 -0400
commitd272f0896bb188b941abef389760f71eb61ea725 (patch)
tree4a85e98f9968197e5f7c4e18b40a080b6500536d
parentfb1c02657b8c6e91e591bfc5587a805cf4e6c7c3 (diff)
downloadroux-d272f0896bb188b941abef389760f71eb61ea725.tar.gz
simplify constant handling in amatch()
-rw-r--r--lisc/isel.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lisc/isel.c b/lisc/isel.c
index c287a8f..5075c32 100644
--- a/lisc/isel.c
+++ b/lisc/isel.c
@@ -713,10 +713,7 @@ amatch(Addr *a, Ref r, ANum *ai, Fn *fn, int top)
 	if (top)
 		memset(a, 0, sizeof *a);
 	if (rtype(r) == RCon) {
-		if (top)
-			a->base = r;
-		else
-			addcon(&a->offset, &fn->con[r.val]);
+		addcon(&a->offset, &fn->con[r.val]);
 		return;
 	}
 	assert(rtype(r) == RTmp);