diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-08-11 13:40:54 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:31 -0400 |
commit | ec5042148e6b9ac9d01130c93a95cbbd0d34b1c1 (patch) | |
tree | 598b6b487d8cbf9a6f2f43353ee500e72a1ec738 /lisc/isel.c | |
parent | 03785fbc9a3f786ad49f2bc77518e739a7d4b469 (diff) | |
download | roux-ec5042148e6b9ac9d01130c93a95cbbd0d34b1c1.tar.gz |
fix my sloppy understanding of x86 assembly!
Diffstat (limited to 'lisc/isel.c')
-rw-r--r-- | lisc/isel.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/lisc/isel.c b/lisc/isel.c index 30c9b1f..05f5f6e 100644 --- a/lisc/isel.c +++ b/lisc/isel.c @@ -115,34 +115,15 @@ sel(Ins i, Fn *fn) case OAdd: case OSub: case OCopy: - emit(i.op, i.to, i.arg[0], i.arg[1]); - break; case OStore: case OStoreb: case OStores: - r0 = i.arg[0]; - goto Load; case OLoad: case OLoadss: case OLoadus: case OLoadsb: case OLoadub: - r0 = i.arg[0]; - if (rtype(r0) == RCon) { - t = newtmp(TLong, fn); - r0 = TMP(t); - } - Load: - r1 = i.arg[1]; - if (rtype(r1) == RCon) { - t = newtmp(TLong, fn); - r1 = TMP(t); - } - emit(i.op, i.to, r0, r1); - if (!req(r0, i.arg[0])) - emit(OCopy, r0, i.arg[0], R); - if (!req(r1, i.arg[1])) - emit(OCopy, r1, i.arg[1], R); + emit(i.op, i.to, i.arg[0], i.arg[1]); break; case ONop: break; |