qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 1c75c40889a9d546ef282d02f56f2763598726f0
parent 131e210b38e1b4473713f0995ac0a3f5a2b9a30e
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Thu,  4 Feb 2016 14:28:55 -0500

cheap rip relative hack

Diffstat:
Mlisc/emit.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 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);