call_handle InitInlineCall( int rtn_id ) { //============================================ // Initialize a call to a runtime routine. #if _CPU == 386 || _CPU == 8086 sym_id sym; inline_rtn __FAR *in_entry; uint name_len; if( !CreatedPragmas ) { InitInlinePragmas(); } in_entry = &InlineTab[ rtn_id ]; sym = in_entry->sym_ptr; if( sym == NULL ) { name_len = strlen( in_entry->name ); strcpy( SymBuff, in_entry->name ); sym = STAdd( SymBuff, name_len ); sym->u.ns.flags = SY_USAGE | SY_TYPE | SY_SUBPROGRAM | SY_FUNCTION; sym->u.ns.u1.s.typ = FT_INTEGER_TARG; sym->u.ns.xt.size = TypeSize( sym->u.ns.u1.s.typ ); sym->u.ns.u3.address = NULL; in_entry->sym_ptr = sym; in_entry->aux = AuxLookupName( in_entry->name, name_len ); } return( CGInitCall( CGFEName( sym, in_entry->typ ), in_entry->typ, in_entry->sym_ptr ) ); #else rtn_id = rtn_id; return( 0 ); #endif }
static call_handle initDtorCall( // INITIALIZE DTOR CALL SYMBOL dtor ) // - DTOR to be called { cg_name dtor_name; call_handle h; dtor_name = CgSymbol( dtor ); h = CGInitCall( dtor_name, CgFuncRetnType( dtor ), (cg_sym_handle)dtor ); return( h ); }
void CgRtCallInit( // SET UP A R/T CALL RT_DEF *def, // - definition for call RTF rt_code ) // - code for run/time call { SYMBOL sym; // - symbol for run/time call sym = RunTimeCallSymbol( rt_code ); def->type = CgTypeOutput( SymFuncReturnType( sym ) ); def->handle = CGInitCall( CgSymbol( sym ) , def->type , (cg_sym_handle)sym ); }
call_handle InitCall( RTCODE rtn_id ) { //====================================== // Initialize a call to a runtime routine. sym_id sym; rt_rtn __FAR *rt_entry; byte typ; int name_len; char __FAR *ptr; rt_entry = &RtnTab[ rtn_id ]; sym = rt_entry->sym_ptr; if( sym == NULL ) { name_len = 0; ptr = rt_entry->name; while( *ptr != NULLCHAR ) { SymBuff[ name_len ] = *ptr; ++name_len; ++ptr; } sym = STAdd( SymBuff, name_len ); sym->u.ns.flags = SY_USAGE | SY_TYPE | SY_SUBPROGRAM | SY_FUNCTION | SY_RT_ROUTINE; if( rt_entry->typ == FT_NO_TYPE ) { sym->u.ns.u1.s.typ = FT_INTEGER_TARG; } else { sym->u.ns.u1.s.typ = rt_entry->typ; } sym->u.ns.xt.size = TypeSize( sym->u.ns.u1.s.typ ); sym->u.ns.u3.address = NULL; sym->u.ns.si.sp.u.imp_segid = AllocImpSegId(); rt_entry->sym_ptr = sym; } typ = F772CGType( sym ); return( CGInitCall( CGFEName( sym, typ ), typ, rt_entry->sym_ptr ) ); }