* disabled last safecall code for non-windows (mantis #12237)

git-svn-id: trunk@12021 -
This commit is contained in:
Jonas Maebe 2008-11-02 15:13:20 +00:00
parent 7f8e9b8d35
commit 7626a91592
4 changed files with 13 additions and 1 deletions

1
.gitattributes vendored
View File

@ -8600,6 +8600,7 @@ tests/webtbs/tw1222.pp svneol=native#text/plain
tests/webtbs/tw12224.pp svneol=native#text/plain
tests/webtbs/tw1223.pp svneol=native#text/plain
tests/webtbs/tw12233.pp svneol=native#text/plain
tests/webtbs/tw12237.pp svneol=native#text/plain
tests/webtbs/tw12242.pp svneol=native#text/plain
tests/webtbs/tw12249.pp svneol=native#text/plain
tests/webtbs/tw1228.pp svneol=native#text/plain

View File

@ -1105,7 +1105,8 @@ implementation
end;
{$if defined(x86) or defined(arm)}
if procdefinition.proccalloption=pocall_safecall then
if (procdefinition.proccalloption=pocall_safecall) and
(target_info.system in system_all_windows) then
begin
{$ifdef x86_64}
cgpara.init;

View File

@ -1063,6 +1063,7 @@ implementation
{$if defined(x86) or defined(arm)}
{ Set return value of safecall procedure if implicit try/finally blocks are disabled }
if not (cs_implicit_exceptions in current_settings.moduleswitches) and
(target_info.system in system_all_windows) and
(procdef.proccalloption=pocall_safecall) then
cg.a_load_const_reg(aktproccode,OS_ADDR,0,NR_FUNCTION_RETURN_REG);
{$endif}

9
tests/webtbs/tw12237.pp Normal file
View File

@ -0,0 +1,9 @@
function f: longint; safecall;
begin
f:=-2;
end;
begin
if (f<>-2) then
halt(1);
end.