Przeglądaj źródła

* safecall is only supposed to do anything for Windows targets. Removed
partial implementation for other targets and run test only for Windows

git-svn-id: trunk@11593 -

Jonas Maebe 17 lat temu
rodzic
commit
c65f8e7652
3 zmienionych plików z 5 dodań i 2 usunięć
  1. 2 1
      compiler/ncgflw.pas
  2. 2 1
      compiler/psub.pas
  3. 1 0
      tests/webtbs/tw8935.pp

+ 2 - 1
compiler/ncgflw.pas

@@ -1521,7 +1521,8 @@ implementation
              if codegenerror then
                exit;
 {$if defined(x86) or defined(arm)}
-             if current_procinfo.procdef.proccalloption=pocall_safecall then
+             if (target_info.system in system_all_windows) and
+                (current_procinfo.procdef.proccalloption=pocall_safecall) then
                begin
                  { Remove and destroy the last exception object }
                  cg.a_call_name(current_asmdata.CurrAsmList,'FPC_POPOBJECTSTACK');

+ 2 - 1
compiler/psub.pas

@@ -744,7 +744,8 @@ implementation
 
 {$if defined(x86) or defined(arm)}
         { set implicit_finally flag for if procedure is safecall }
-        if procdef.proccalloption=pocall_safecall then
+        if (target_info.system in system_all_windows) and
+           (procdef.proccalloption=pocall_safecall) then
           include(flags, pi_needs_implicit_finally);
 {$endif}
         { firstpass everything }

+ 1 - 0
tests/webtbs/tw8935.pp

@@ -1,3 +1,4 @@
+{%os=win32,win64,wince}
 {%cpu=x86_64,i386,arm}
 {%result=229}