summaryrefslogtreecommitdiff
path: root/6/isel.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-02-13 14:44:00 -0800
committerOri Bernstein <ori@eigenstate.org>2016-02-20 21:54:11 -0800
commit7096d0e99d9deb053a7763f49b2b1b7b1df20a6a (patch)
tree049ac0cb30b67389d8a1c9f7e123d5c8bdbd6dc0 /6/isel.c
parenteba5edcf79813be921d8116ece30c10ca65c9fb3 (diff)
downloadmc-7096d0e99d9deb053a7763f49b2b1b7b1df20a6a.tar.gz
Start refactoring
Split flattening and lowering.
Diffstat (limited to '6/isel.c')
-rw-r--r--6/isel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/6/isel.c b/6/isel.c
index 66c961b..4042428 100644
--- a/6/isel.c
+++ b/6/isel.c
@@ -108,7 +108,9 @@ static Loc *varloc(Isel *s, Node *n)
} else if (hthas(s->stkoff, n)) {
off = ptoi(htget(s->stkoff, n));
l = locmem(-off, locphysreg(Rrbp), NULL, mode(n));
- } else {
+ } else if (stacknode(n)) {
+ assert(0);
+ } else {
l = htget(s->reglocs, n);
if (!l) {
l = locreg(mode(n));