* insert fwait after fcompp, resolves

git-svn-id: trunk@45500 -
This commit is contained in:
florian 2020-05-25 20:38:19 +00:00
parent 41ccebb737
commit b4de0b2e9c
3 changed files with 22 additions and 0 deletions
.gitattributes
compiler/x86
tests/webtbs

1
.gitattributes vendored
View File

@ -18296,6 +18296,7 @@ tests/webtbs/tw3708.pp svneol=native#text/plain
tests/webtbs/tw37095.pp svneol=native#text/plain
tests/webtbs/tw37095d/uw37095.pp svneol=native#text/plain
tests/webtbs/tw37107.pp svneol=native#text/pascal
tests/webtbs/tw37136.pp svneol=native#text/pascal
tests/webtbs/tw3719.pp svneol=native#text/plain
tests/webtbs/tw3721.pp svneol=native#text/plain
tests/webtbs/tw3742.pp svneol=native#text/plain

View File

@ -1401,6 +1401,8 @@ unit nx86add;
emit_none(A_SAHF,S_NO);
cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_AX);
end;
if cs_fpu_fwait in current_settings.localswitches then
current_asmdata.CurrAsmList.concat(Taicpu.Op_none(A_FWAIT,S_NO));
end
else
{$endif x86_64}

19
tests/webtbs/tw37136.pp Normal file
View File

@ -0,0 +1,19 @@
{ %CPU=i386 }
{ %OPT=-Cp80386 }
program NaNTest;
{$mode objfpc}
{$SAFEFPUEXCEPTIONS on} // does not change anything
uses Math;
var
B: Boolean;
N1, N2: Extended;
S: string;
begin
N1 := NaN;
try
B := N1<4;
except
halt(0);
end;
halt(1);
end.