Răsfoiți Sursa

* 8087 fixes in tx86addnode.second_cmpfloat:
- use FSTSW instead of FNSTSW
- insert a FWAIT after the FSTSW, because the value is immediately loaded
afterwards by the integer unit of the CPU

git-svn-id: trunk@26110 -

nickysn 11 ani în urmă
părinte
comite
6fdadb6248
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      compiler/x86/nx86add.pas

+ 2 - 1
compiler/x86/nx86add.pas

@@ -1234,7 +1234,8 @@ unit nx86add;
             if current_settings.cputype < cpu_286 then
             if current_settings.cputype < cpu_286 then
               begin
               begin
                 tg.gettemp(current_asmdata.CurrAsmList,2,2,tt_normal,tmpref);
                 tg.gettemp(current_asmdata.CurrAsmList,2,2,tt_normal,tmpref);
-                emit_ref(A_FNSTSW,S_NO,tmpref);
+                emit_ref(A_FSTSW,S_NO,tmpref);
+                emit_none(A_FWAIT,S_NO);
                 cg.getcpuregister(current_asmdata.CurrAsmList,NR_AX);
                 cg.getcpuregister(current_asmdata.CurrAsmList,NR_AX);
                 emit_ref_reg(A_MOV,S_W,tmpref,NR_AX);
                 emit_ref_reg(A_MOV,S_W,tmpref,NR_AX);
                 emit_none(A_SAHF,S_NO);
                 emit_none(A_SAHF,S_NO);