diff options
| author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-18 15:03:25 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-18 15:15:02 -0400 |
| commit | 12e22bb1b4a687def2f36f281456da28ee3a4d95 (patch) | |
| tree | b08409e5270c61b6c5268b5abec2df3483ae70d2 | |
| parent | b19b9a27a0efa7d46eda31d0bb81ade955d80e99 (diff) | |
| download | roux-12e22bb1b4a687def2f36f281456da28ee3a4d95.tar.gz | |
lamely handle swap of sse registers
| -rw-r--r-- | lisc/emit.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lisc/emit.c b/lisc/emit.c index dcda556..ee0318f 100644 --- a/lisc/emit.c +++ b/lisc/emit.c @@ -424,6 +424,16 @@ emitins(Ins i, Fn *fn, FILE *f) if (!req(i.to, R)) emitcopy(i.to, TMP(RSP), Kl, fn, f); break; + case OSwap: + if (KBASE(i.cls) == 0) + goto Table; + /* for floats, there is no swap instruction + * so we use xmm15 as a temporary + */ + emitcopy(TMP(XMM0+15), i.arg[0], i.cls, fn, f); + emitcopy(i.arg[0], i.arg[1], i.cls, fn, f); + emitcopy(i.arg[1], TMP(XMM0+15), i.cls, fn, f); + break; } } |
