From cf95d1a9a9f9dacbe38dee2f753615c091ba6319 Mon Sep 17 00:00:00 2001 From: lemon Date: Thu, 18 Dec 2025 17:53:55 +0100 Subject: regalloc+emit: get rid of xsave/xrestore hack Was used for situation where we needed to spill more than 1 temporary and have to use a register that is already used. Instead of push/pop, we can just allocate and set aside specific stack slots for this purpose. Also, reworked linearscan() interval sets to separate FPR/GPR intervals. --- x86_64/emit.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'x86_64') diff --git a/x86_64/emit.c b/x86_64/emit.c index 89585b8..125cef5 100644 --- a/x86_64/emit.c +++ b/x86_64/emit.c @@ -1164,12 +1164,6 @@ emitinstr(uchar **pcode, struct function *fn, struct block *blk, int curi, struc Xxor(pcode, cls, l, r); } break; - case Oxsave: - Xpush(pcode, mkregoper(ins->l).reg); - break; - case Oxrestore: - Xpop(pcode, mkregoper(ins->l).reg); - break; case Ocall: Xcall(pcode, KPTR, ref2oper(ins->l)); break; -- cgit v1.2.3