فهرست منبع

Fix safecall for cpus for which NR_FUNCTION_RESULT_REG is different from NR_FUNCTION_RETURN_REG

git-svn-id: trunk@22489 -
pierre 13 سال پیش
والد
کامیت
18698bc93d
1فایلهای تغییر یافته به همراه2 افزوده شده و 3 حذف شده
  1. 2 3
      compiler/ncgflw.pas

+ 2 - 3
compiler/ncgflw.pas

@@ -1459,6 +1459,7 @@ implementation
         paramanager.freecgpara(current_asmdata.CurrAsmList,cgpara);
         cgpara.done;
         cg.g_call(current_asmdata.CurrAsmList,'FPC_SAFECALLHANDLER');
+        cg.a_load_reg_reg(current_asmdata.CurrAsmList,OS_INT,OS_INT,NR_FUNCTION_RESULT_REG, NR_FUNCTION_RETURN_REG);
       end;
 
     procedure tcgtryfinallynode.pass_generate_code;
@@ -1561,13 +1562,11 @@ implementation
                CGMessage(cg_e_control_flow_outside_finally);
              if codegenerror then
                exit;
-{$if defined(x86) or defined(arm)}
              if (tf_safecall_exceptions in target_info.flags) and
                 (current_procinfo.procdef.proccalloption=pocall_safecall) then
                handle_safecall_exception
              else
-{$endif}
-               cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE',false);
+                cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE',false);
            end
          else
            begin