mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 02:32:51 +02:00
* disabled last safecall code for non-windows (mantis #12237)
git-svn-id: trunk@12021 -
This commit is contained in:
parent
7f8e9b8d35
commit
7626a91592
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
9
tests/webtbs/tw12237.pp
Normal file
@ -0,0 +1,9 @@
|
||||
function f: longint; safecall;
|
||||
begin
|
||||
f:=-2;
|
||||
end;
|
||||
|
||||
begin
|
||||
if (f<>-2) then
|
||||
halt(1);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user