diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-02-04 14:28:55 -0500 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-02-04 14:28:55 -0500 |
commit | 1c75c40889a9d546ef282d02f56f2763598726f0 (patch) | |
tree | 18d906d816b540bab8e4138df5deaeb97275b0fc /lisc | |
parent | 131e210b38e1b4473713f0995ac0a3f5a2b9a30e (diff) | |
download | roux-1c75c40889a9d546ef282d02f56f2763598726f0.tar.gz |
cheap rip relative hack
Diffstat (limited to 'lisc')
-rw-r--r-- | lisc/emit.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisc/emit.c b/lisc/emit.c index 480b6d0..f3d1537 100644 --- a/lisc/emit.c +++ b/lisc/emit.c @@ -295,6 +295,7 @@ Next: break; case RCon: emitcon(&fn->con[ref.val], f); + fprintf(f, "(%%rip)"); break; case RTmp: assert(isreg(ref)); @@ -384,7 +385,9 @@ emitins(Ins i, Fn *fn, FILE *f) default: diag("emit: invalid call instruction"); case RCon: - emitf("callq %M0", &i, fn, f); + fprintf(f, "callq "); + emitcon(&fn->con[i.arg[0].val], f); + fprintf(f, "\n"); break; case RTmp: emitf("callq *%L0", &i, fn, f); |