diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-04-04 14:55:28 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-04-04 15:44:43 -0400 |
commit | 7b3f0f8424155d4213cc8ad399fb41a4e4d64333 (patch) | |
tree | 8b9a22fc34870716d8730d564583a13e8d8037fa /emit.c | |
parent | 74562a93debff6954f16a4c3434efa69d37c954b (diff) | |
download | roux-7b3f0f8424155d4213cc8ad399fb41a4e4d64333.tar.gz |
fat il!
Diffstat (limited to 'emit.c')
-rw-r--r-- | emit.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/emit.c b/emit.c index 32e4078..4d8bd67 100644 --- a/emit.c +++ b/emit.c @@ -129,7 +129,7 @@ static char *rname[][4] = { static int slot(int s, Fn *fn) { - struct { int i:14; } x; + struct { int i:29; } x; /* sign extend s using a bitfield */ x.i = s; @@ -263,9 +263,9 @@ Next: case RSlot: fprintf(f, "%d(%%rbp)", slot(ref.val, fn)); break; - case RAMem: + case RMem: Mem: - m = &fn->mem[ref.val & AMask]; + m = &fn->mem[ref.val]; if (rtype(m->base) == RSlot) { off.type = CBits; off.bits.i = slot(m->base.val, fn); @@ -310,7 +310,7 @@ Next: c = *s++; ref = getarg(c, i); switch (rtype(ref)) { - case RAMem: + case RMem: goto Mem; case RSlot: fprintf(f, "%d(%%rbp)", slot(ref.val, fn)); |