qbe

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

commit 12e22bb1b4a687def2f36f281456da28ee3a4d95
parent b19b9a27a0efa7d46eda31d0bb81ade955d80e99
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Fri, 18 Mar 2016 15:03:25 -0400

lamely handle swap of sse registers

Diffstat:
Mlisc/emit.c | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

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