瀏覽代碼

* fix Linux/i386 and Win32 after r43578

git-svn-id: trunk@43583 -
Jonas Maebe 5 年之前
父節點
當前提交
0802edb710
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 1 0
      compiler/i386/n386flw.pas
  2. 2 1
      compiler/ncgutil.pas

+ 1 - 0
compiler/i386/n386flw.pas

@@ -375,6 +375,7 @@ procedure ti386tryfinallynode.pass_generate_code;
     emit_scope_end;
     if is_safecall then
       begin
+        current_asmdata.getjumplabel(safecalllabel);
         cg.a_jmp_always(current_asmdata.CurrAsmList,safecalllabel);
         { RTL handler will jump here on exception }
         cg.a_label(current_asmdata.CurrAsmList,exceptlabel);

+ 2 - 1
compiler/ncgutil.pas

@@ -767,7 +767,8 @@ implementation
             parasize:=0;
             { For safecall functions with safecall-exceptions enabled the funcret is always returned as a para
               which is considered a normal para on the c-side, so the funcret has to be pop'ed normally. }
-            if not current_procinfo.procdef.generate_safecall_wrapper then
+            if not current_procinfo.procdef.generate_safecall_wrapper and
+               paramanager.ret_in_param(current_procinfo.procdef.returndef,current_procinfo.procdef) then
               inc(parasize,sizeof(pint));
           end
         else