void nteh_framehandler(symbol *scopetable) { code *c; // Generate: // MOV EAX,&scope_table // JMP __cpp_framehandler if (scopetable) { symbol_debug(scopetable); c = gencs(NULL,0xB8+AX,0,FLextern,scopetable); // MOV EAX,&scope_table gencs(c,0xE9,0,FLfunc,rtlsym[RTLSYM_CPP_HANDLER]); // JMP __cpp_framehandler pinholeopt(c,NULL); codout(c); code_free(c); } }
void nteh_framehandler(symbol *scopetable) { // Generate: // MOV EAX,&scope_table // JMP __cpp_framehandler if (scopetable) { symbol_debug(scopetable); code *c = gencs(NULL,0xB8+AX,0,FLextern,scopetable); // MOV EAX,&scope_table #if MARS gencs(c,0xE9,0,FLfunc,getRtlsym(RTLSYM_D_HANDLER)); // JMP _d_framehandler #else gencs(c,0xE9,0,FLfunc,getRtlsym(RTLSYM_CPP_HANDLER)); // JMP __cpp_framehandler #endif pinholeopt(c,NULL); codout(c); code_free(c); } }
void nteh_framehandler(Symbol *sfunc, Symbol *scopetable) { // Generate: // MOV EAX,&scope_table // JMP __cpp_framehandler if (scopetable) { symbol_debug(scopetable); CodeBuilder cdb; cdb.gencs(0xB8+AX,0,FLextern,scopetable); // MOV EAX,&scope_table #if MARS cdb.gencs(0xE9,0,FLfunc,getRtlsym(RTLSYM_D_HANDLER)); // JMP _d_framehandler #else cdb.gencs(0xE9,0,FLfunc,getRtlsym(RTLSYM_CPP_HANDLER)); // JMP __cpp_framehandler #endif code *c = cdb.finish(); pinholeopt(c,NULL); codout(sfunc->Sseg,c); code_free(c); } }