|
@@ -285,6 +285,7 @@ procedure ti386tryfinallynode.pass_generate_code;
|
|
oldflowcontrol,tryflowcontrol : tflowcontrol;
|
|
oldflowcontrol,tryflowcontrol : tflowcontrol;
|
|
is_safecall: boolean;
|
|
is_safecall: boolean;
|
|
hreg: tregister;
|
|
hreg: tregister;
|
|
|
|
+ sym : tasmsymbol;
|
|
begin
|
|
begin
|
|
if (target_info.system<>system_i386_win32) then
|
|
if (target_info.system<>system_i386_win32) then
|
|
begin
|
|
begin
|
|
@@ -341,16 +342,22 @@ procedure ti386tryfinallynode.pass_generate_code;
|
|
used_in_proc:=used_in_proc+[RS_EBX,RS_ESI,RS_EDI];
|
|
used_in_proc:=used_in_proc+[RS_EBX,RS_ESI,RS_EDI];
|
|
|
|
|
|
current_asmdata.getjumplabel(exceptlabel);
|
|
current_asmdata.getjumplabel(exceptlabel);
|
|
|
|
+ sym:=current_asmdata.RefAsmSymbol('__FPC_except_safecall',AT_FUNCTION);
|
|
emit_scope_start(
|
|
emit_scope_start(
|
|
- current_asmdata.RefAsmSymbol('__FPC_except_safecall',AT_FUNCTION),
|
|
|
|
|
|
+ sym,
|
|
exceptlabel
|
|
exceptlabel
|
|
);
|
|
);
|
|
|
|
+ current_module.add_extern_asmsym(sym);
|
|
end
|
|
end
|
|
else
|
|
else
|
|
- emit_scope_start(
|
|
|
|
- current_asmdata.RefAsmSymbol('__FPC_finally_handler',AT_FUNCTION),
|
|
|
|
- current_asmdata.RefAsmSymbol(finalizepi.procdef.mangledname,AT_FUNCTION)
|
|
|
|
- );
|
|
|
|
|
|
+ begin
|
|
|
|
+ sym:=current_asmdata.RefAsmSymbol('__FPC_finally_handler',AT_FUNCTION);
|
|
|
|
+ emit_scope_start(
|
|
|
|
+ sym,
|
|
|
|
+ current_asmdata.RefAsmSymbol(finalizepi.procdef.mangledname,AT_FUNCTION)
|
|
|
|
+ );
|
|
|
|
+ current_module.add_extern_asmsym(sym);
|
|
|
|
+ end;
|
|
|
|
|
|
{ try code }
|
|
{ try code }
|
|
if assigned(left) then
|
|
if assigned(left) then
|
|
@@ -520,14 +527,20 @@ procedure ti386tryexceptnode.pass_generate_code;
|
|
if assigned(right) then
|
|
if assigned(right) then
|
|
begin
|
|
begin
|
|
current_asmdata.getaddrlabel(filterlabel);
|
|
current_asmdata.getaddrlabel(filterlabel);
|
|
|
|
+ sym:=current_asmdata.RefAsmSymbol('__FPC_on_handler',AT_FUNCTION);
|
|
emit_scope_start(
|
|
emit_scope_start(
|
|
- current_asmdata.RefAsmSymbol('__FPC_on_handler',AT_FUNCTION),
|
|
|
|
|
|
+ sym,
|
|
filterlabel);
|
|
filterlabel);
|
|
|
|
+ current_module.add_extern_asmsym(sym);
|
|
end
|
|
end
|
|
else
|
|
else
|
|
- emit_scope_start(
|
|
|
|
- current_asmdata.RefAsmSymbol('__FPC_except_handler',AT_FUNCTION),
|
|
|
|
- exceptlabel);
|
|
|
|
|
|
+ begin
|
|
|
|
+ sym:=current_asmdata.RefAsmSymbol('__FPC_except_handler',AT_FUNCTION);
|
|
|
|
+ emit_scope_start(
|
|
|
|
+ sym,
|
|
|
|
+ exceptlabel);
|
|
|
|
+ current_module.add_extern_asmsym(sym);
|
|
|
|
+ end;
|
|
|
|
|
|
{ set control flow labels for the try block }
|
|
{ set control flow labels for the try block }
|
|
current_procinfo.CurrExitLabel:=exittrylabel;
|
|
current_procinfo.CurrExitLabel:=exittrylabel;
|