summary refs log tree commit diff
path: root/lisc
diff options
context:
space:
mode:
Diffstat (limited to 'lisc')
-rw-r--r--lisc/isel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisc/isel.c b/lisc/isel.c
index ef9cbb7..51a0aa0 100644
--- a/lisc/isel.c
+++ b/lisc/isel.c
@@ -447,6 +447,7 @@ selret(Blk *b, Fn *fn)
 		if (a.inmem) {
 			assert(rtype(fn->retr) == RTmp);
 			emit(OCopy, Kl, TMP(RAX), fn->retr, R);
+			chuse(fn->retr, +1, fn);
 			blit(fn->retr, 0, r0, a.size, fn);
 		} else {
 			nr[0] = nr[1] = 0;
@@ -458,6 +459,7 @@ selret(Blk *b, Fn *fn)
 				r = newtmp("abi", Kl, fn);
 				emit(OLoad, Kl, reg[1], r, R);
 				emit(OAdd, Kl, r, r0, getcon(8, fn));
+				chuse(r0, +1, fn);
 			}
 			emit(OLoad, Kl, reg[0], r0, R);
 		}