static DF2(jtfolkcomp0){F2PREFIP;DECLFGH;PROLOG(0035);A z;AF f;D oldct=jt->ct; RZ(a&&w); jt->ct=0; if(f=atcompf(a,w,self))z=f(jt,a,w,self); else if(cap(fs))CAP2 else FOLK2; jt->ct=oldct; EPILOG(z); }
/* * @brief Called to destruct a fixed msg size (DLP_FLASH_PDU_SIZE) * * @param msg */ static inline void dlp_flash_msg_destruct_fix(struct hsi_msg *msg) { PROLOG("msg:0x%p", msg); /* Delete the received msg */ dlp_pdu_free(msg, msg->channel); EPILOG(); }
static DF1(insert){PROLOG;A hs,*hv,z;I hn,j,k,m,n; RZ(w); m=IC(w); hs=VAV(self)->h; hn=AN(hs); hv=AAV(hs); if(!m)R df1(w,iden(*hv)); j=n=MAX(hn,m-1); RZ(z=AR(w)?from(sc(n%m),w):ca(w)); if(1==n)R z; DO(n, --j; k=j%hn; RZ(z=(VAV(hv[k])->f2)(from(sc(j%m),w),z,hv[k]))); EPILOG(z); }
/* * @brief Called to destruct a variable msg size (_write function) * * @param msg */ static inline void dlp_flash_msg_destruct_var(struct hsi_msg *msg) { PROLOG("msg:0x%p", msg); /* Delete the received msg * (size is variable, so dont consider the default PDU size) */ dlp_pdu_free(msg, -1); EPILOG(); }
/* * Push RX pdu on channel 0 * */ static int dlp_flash_push_rx_pdu(struct dlp_channel *ch_ctx) { int ret; struct hsi_msg *rx_msg; PROLOG(); /* Allocate a new RX msg */ rx_msg = dlp_pdu_alloc(ch_ctx->hsi_channel, HSI_MSG_READ, DLP_FLASH_RX_PDU_SIZE, 1, ch_ctx, dlp_flash_complete_rx, dlp_flash_msg_destruct_fix); if (!rx_msg) { CRITICAL("dlp_pdu_alloc(RX) failed"); ret = -ENOMEM; goto out; } /* Send the RX HSI msg */ ret = hsi_async(rx_msg->cl, rx_msg); if (ret) { CRITICAL("hsi_async() failed, ret:%d", ret); ret = -EIO; goto free_msg; } EPILOG(); return 0; free_msg: /* Free the msg */ dlp_pdu_free(rx_msg, rx_msg->channel); out: EPILOG(); return ret; }
static DF1(reduce){PROLOG;DECLF;A y,z;C*u,*v;I c,k,m,old,t; RZ(w); m=IC(w); if(!m)R df1(w,iden(fs)); RZ(z=tail(w)); if(1==m)R z; t=AT(w); c=AN(z); GA(y,t,c,AR(z),AS(z)); u=CAV(y); k=SZT(t,c); v=CAV(w)+k*(m-1); old=tbase+ttop; DO(m-1, MC(u,v-=k,k); RZ(z=f2(y,z,fs)); gc(z,old)); EPILOG(z); }
static DF1(jtpowseqlim){PROLOG(0039);A x,y,z,*zv;I i,n; RZ(w); RZ(z=exta(BOX,1L,1L,20L)); zv=AAV(z); *zv++=x=w; i=1; n=AN(z); while(1){ if(n==i){RZ(z=ext(0,z)); zv=i+AAV(z); n=AN(z);} RZ(*zv++=x=df1(y=x,self)); if(equ(x,y)){AN(z)=*AS(z)=i; break;} ++i; } z=ope(z); EPILOG(z); } /* f^:(<_) w */
static DF2(xd){PROLOG;DECLFG;A f,*line,loc=local,name,seq,z=0;B b;DC dv; I i=0,n,old; b=a&&w; f=*(b+AAV(sv->h)); line=AAV(f); n=nline=AN(f); ASSERT(n,EVDOMAIN); GA(local,SYMB,twprimes[0],1,0); symbis(scnm(CALPHA),a,local); symbis(scnm(COMEGA),w,local); RZ(dv=debadd(DCDEFN)); dv->p=sv->s; drun=0; old=tbase+ttop; ra(self); for(;0<=i&&i<n;i++){ tpop(old); dv->ln=i; dv->n=1+(0!=a); z=parse(ca(line[i])); if(!debugb&&!z) break; } if(debugb&&!z){z=tpush(qpopres); qpopres=0;} z=car(z); ++AC(local); fa(local); local=loc; asgn=0; fa(self); debz(); if(!z) jsignal(EVRESULT); EPILOG(z); }
static DF2(jtfolk2){F2PREFIP;DECLFGH;PROLOG(0029);A z; FOLK2; EPILOG(z);}
static DF1(jtcork1){F1PREFIP;DECLFGH;PROLOG(0026);A z; CAP1; EPILOG(z);}
DesRound() // 8 AsmFPERM() //end AS2( movd ebp, mm6 ) // swap and write out AS1( bswap ebx ) AS1( bswap eax ) #ifdef __GNUC__ AS2( movd esi, mm7 ) // outBlock #else AS2( mov esi, DWORD PTR [ebp + 12] ) // outBlock #endif AS2( mov DWORD PTR [esi], ebx ) // right first AS2( mov DWORD PTR [esi + 4], eax ) EPILOG() } #endif // defined(DO_DES_ASM) } // namespace
static DF2(jtnvv2){F1PREFIP;DECLFGH;PROLOG(0033); PUSHZOMB; A protw = (A)((I)w+((I)jtinplace&JTINPLACEW)); A prota = (A)((I)a+((I)jtinplace&JTINPLACEA)); A hx=(h2)((VAV(hs)->flag&VINPLACEOK2)?jtinplace:jt,a,w,hs); POPZOMB; A z=(g2)(VAV(gs)->flag&VINPLACEOK2&&hx!=protw&&hx!=prota?( (J)((I)jt|JTINPLACEW) ):jt,fs,hx,gs); EPILOG(z);}
static DF2(jtfolkcomp){F2PREFIP;DECLFGH;PROLOG(0034);A z;AF f; RZ(a&&w); if(f=atcompf(a,w,self))z=f(jt,a,w,self); else if(cap(fs))CAP2 else FOLK2; EPILOG(z); }
// nvv forks. n must not be inplaced, since the fork may be reused. hx can be inplaced unless protected by caller. static DF1(jtnvv1){F1PREFIP;DECLFGH;PROLOG(0032); PUSHZOMB; A protw = (A)((I)w+((I)jtinplace&JTINPLACEW)); A hx=(h1)((VAV(hs)->flag&VINPLACEOK1)?jtinplace:jt, w,hs); POPZOMB; A z=(g2)(VAV(gs)->flag&VINPLACEOK2&&hx!=protw?( (J)((I)jt|JTINPLACEW) ):jt,fs,hx,gs); EPILOG(z);}
static DF2(jtcorx2){F2PREFIP;DECLFGH;PROLOG(0031);A z; if(cap(fs))RZ(z=df2(a,w,folk(ds(CCAP),gs,hs))) else FOLK2; EPILOG(z);}
// (name g h). If name is ultimately defined as [:, we redefine the derived verb and then run it, with no inplacing for it. Deprecated. // The normal path supports inplacing static DF1(jtcorx1){F1PREFIP;DECLFGH;PROLOG(0030);A z; if(cap(fs))RZ(z=df1( w,folk(ds(CCAP),gs,hs))) else FOLK1; EPILOG(z);}
static DF2(jtcork2){F2PREFIP;DECLFGH;PROLOG(0027);A z; CAP2; EPILOG(z);}
static DF1(jtfolk1){F1PREFIP;DECLFGH;PROLOG(0028);A z; FOLK1; EPILOG(z);}