From 9de843aeb5fcc783da90879b22792881487d5f1b Mon Sep 17 00:00:00 2001 From: dzaima Date: Fri, 2 Jul 2021 19:27:52 +0300 Subject: [PATCH] stack management for FN_Oi --- src/jit/nvm_x86_64.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jit/nvm_x86_64.c b/src/jit/nvm_x86_64.c index 335e21e8..bbcaa3b1 100644 --- a/src/jit/nvm_x86_64.c +++ b/src/jit/nvm_x86_64.c @@ -85,11 +85,11 @@ INS B i_FN2O(B w, B f, B x, u32* bc) { POS_UPD; dec(f); return r; } -INS B i_FN1Oi(B x, BB2B fm, u32* bc GA1) { GS_UPD;POS_UPD; +INS B i_FN1Oi(B x, BB2B fm, u32* bc) { POS_UPD; B r = isNothing(x)? x : fm(b((u64)0), x); return r; } -INS B i_FN2Oi(B w, BB2B fm, BBB2B fd, u32* bc GA1) { P(x) GS_UPD;POS_UPD; +INS B i_FN2Oi(B w, B x, BB2B fm, BBB2B fd, u32* bc) { POS_UPD; if (isNothing(x)) { dec(w); return x; } else return isNothing(w)? fm(b((u64)0), x) : fd(b((u64)0), w, x); } @@ -525,8 +525,8 @@ Nvm_res m_nvm(Body* body) { case FN2O: TOPp; GET(R_A1,1,0); GET(R_A2,2,1); IMM(R_A3,off); CCALL(i_FN2O); break; // (B w, B f, B x, u32* bc) case FN1Ci: { u64 fn = L64; POS_UPD(R_A0,R_A3); MOV(R_A1, R_RES); GET(R_A2,0,2); CCALL(fn); } break; case FN2Ci: { u64 fn = L64; POS_UPD(R_A0,R_A3); MOV(R_A1, R_RES); GET(R_A2,1,1); CCALL(fn); } break; - case FN1Oi:TOPp; IMM(R_A1,L64); IMM(R_A2,off); INV(3,0,i_FN1Oi); break; // (B, BB2B fm, u32* bc, S) - case FN2Oi:TOPp; IMM(R_A1,L64); IMM(R_A2, L64); IMM(R_A3,off); INV(4,0,i_FN2Oi); break; // (B, BB2B fm, BBB2B fd, u32* bc, S) + case FN1Oi:TOPp; GET(R_A1,0,2); IMM(R_A1,L64); IMM(R_A2,off); CCALL(i_FN1Oi); break; // ( B x, BB2B fm, u32* bc) + case FN2Oi:TOPp; GET(R_A1,1,1); IMM(R_A2,L64); IMM(R_A3, L64); IMM(R_A4,off); CCALL(i_FN2Oi); break; // (B w, B x, BB2B fm, BBB2B fd, u32* bc) case ARRM: case ARRO:; u32 sz = *bc++; if (sz) { TOPp; IMM(R_A1, sz); INV(2,0,i_ARR_p); } // (B, i64 sz, S)