* fixed tcg8086.g_flags2reg, so it behaves the same way as tcgx86.g_flags2reg

after r27581 in regard to floating point comparisons. The tcmpnan.pp test now
  almost works (i.e. fails due to only one error, instead of many).

git-svn-id: trunk@27605 -
This commit is contained in:
nickysn 2014-04-19 22:54:29 +00:00
parent 5fe27ae815
commit bf6ad0ff78

View File

@ -1681,6 +1681,25 @@ unit cgcpu;
end;
current_asmdata.getjumplabel(hl_skip);
{ we can't just forward invf to a_jmp_flags for FA,FAE,FB and FBE, because
in the case of NaNs:
not(F_FA )<>F_FBE
not(F_FAE)<>F_FB
not(F_FB )<>F_FAE
not(F_FBE)<>F_FA
}
case f of
F_FA,F_FAE:
invf:=FPUFlags2Flags[invf];
F_FB,F_FBE:
begin
ai:=Taicpu.op_sym(A_Jcc,S_NO,hl_skip);
ai.SetCondition(C_P);
ai.is_jmp:=true;
list.concat(ai);
invf:=FPUFlags2Flags[invf];
end;
end;
a_jmp_flags(list,invf,hl_skip);
{ 16-bit INC is shorter than 8-bit }