summary refs log tree commit diff
path: root/lisc/isel.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-02-15 14:22:22 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-02-15 16:34:16 -0500
commit16e430935db1f928452767af23ea1a1c6d000299 (patch)
treeec7e317757d60eca82a292cca147c0f46b9b7cf8 /lisc/isel.c
parent916555cb10110f6c748e70cb5337752432a325b8 (diff)
downloadroux-16e430935db1f928452767af23ea1a1c6d000299.tar.gz
collect and emit fp constants
Diffstat (limited to 'lisc/isel.c')
-rw-r--r--lisc/isel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisc/isel.c b/lisc/isel.c
index 578eec7..d5ccdd7 100644
--- a/lisc/isel.c
+++ b/lisc/isel.c
@@ -114,7 +114,7 @@ fixarg(Ref *r, int k, int phi, Fn *fn)
 {
 	Addr a;
 	Ref r0, r1;
-	int s;
+	int s, n;
 
 	r1 = r0 = *r;
 	s = rslot(r0, fn);
@@ -127,8 +127,8 @@ fixarg(Ref *r, int k, int phi, Fn *fn)
 		vgrow(&fn->mem, ++fn->nmem);
 		memset(&a, 0, sizeof a);
 		a.offset.type = CAddr;
-		sprintf(a.offset.label, ".fp%d", r0.val);
-		fn->con[r0.val].emit = 1;
+		n = stashfp(fn->con[r0.val].bits.i, KWIDE(k));
+		sprintf(a.offset.label, ".Lfp%d", n);
 		fn->mem[fn->nmem-1] = a;
 	}
 	else if (!phi && rtype(r0) == RCon && noimm(r0, fn)) {