static cg_name finiDtorCall( // COMPLETE DTOR CALL call_handle handle, // - call handle unsigned cdtor ) // - cdtor arg to use { cg_name n; CgBackCallGened( handle ); n = CgFetchPtr( CGCall( handle ) ); CallStabCdArgSet( handle, cdtor ); return( n ); }
void CgFunDeregister( // DE-REGISTER A FUNCTION SYMBOL rw ) // - symbol for R/W block { RT_DEF def; // - R/T call control cg_name opt_thr; // - optimized expression for addr[THREAD_CTL] DbgVerify( CompFlags.rw_registration, "not R/W Registration" ); if( CompFlags.fs_registration ) { cg_name expr; CgRtCallInit( &def, RTF_FS_POP ); expr = CgSymbolPlusOffset( rw, 0 ); expr = CgFetchPtr( expr ); CgRtParam( expr, &def, TY_POINTER ); CgRtCallExecDone( &def ); } else { opt_thr = pointOptSym( (OPT_DEFN *)&optFuncReg ); if( opt_thr == NULL ) { CgRtCallExecNoArgs( RTF_DEREGISTER ); } else { CgAssignPtr( opt_thr, CgFetchPtr( CgSymbolPlusOffset( rw, 0 ) ) ); } } }
void CgFunRegister( // REGISTER A FUNCTION FN_CTL* fctl, // - function information SYMBOL rw, // - symbol for R/W block SYMBOL ro ) // - symbol for R/O block { SE* se; // - current position #if _CPU == _AXP CgAssignPtr( CgSymbolPlusOffset( rw, 0 ), CgAddrSymbol( ro ) ); CompFlags.inline_fun_reg = TRUE; #else RT_DEF def; // - R/T call control cg_name opt_thr; // - optimized expression for addr[THREAD_CTL] DbgVerify( CompFlags.rw_registration, "not R/W Registration" ); if( CompFlags.fs_registration ) { CompFlags.inline_fun_reg = TRUE; CgRtCallInit( &def, RTF_FS_PUSH ); CgRtParamAddrSym( &def, rw ); CgRtCallExecDone( &def ); rw = registerHandler( rw, RTF_FS_HANDLER ); } else { opt_thr = pointOptSym( &optFuncReg ); if( opt_thr == NULL ) { rtRegister( rw, ro ); } else { CompFlags.inline_fun_reg = TRUE; CgAssignPtr( CgSymbolPlusOffset( rw, 0 ) , CgFetchPtr( opt_thr ) ); CgAssignPtr( CgSymbol( optFuncReg.sym ) , CgAddrSymbol( rw ) ); rw = registerHandler( rw, RTF_FS_HANDLER_RTN ); } } CgAssignPtr( CgSymbolPlusOffset ( rw, CgbkInfo.size_data_ptr + CgbkInfo.size_fs_hand ) , CgAddrSymbol( ro ) ); #endif if( fctl->is_dtor ) { se = BlkPosnCurr(); } else { se = NULL; } FstabAssignStateVar( se ); }