Browse Source

* tx86addnode.second_cmpfloat: on i8086 only load the high byte of the FPU
status word after fstsw (and before sahf), because 8-bit memory transfers are
faster on the i8088, due to the 8-bit data bus

git-svn-id: trunk@26245 -

nickysn 11 years ago
parent
commit
be5f49b3e5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      compiler/x86/nx86add.pas

+ 3 - 1
compiler/x86/nx86add.pas

@@ -1244,7 +1244,9 @@ unit nx86add;
                 tg.gettemp(current_asmdata.CurrAsmList,2,2,tt_normal,tmpref);
                 tg.gettemp(current_asmdata.CurrAsmList,2,2,tt_normal,tmpref);
                 emit_ref(A_FSTSW,S_NO,tmpref);
                 emit_ref(A_FSTSW,S_NO,tmpref);
                 cg.getcpuregister(current_asmdata.CurrAsmList,NR_AX);
                 cg.getcpuregister(current_asmdata.CurrAsmList,NR_AX);
-                emit_ref_reg(A_MOV,S_W,tmpref,NR_AX);
+                inc(tmpref.offset);
+                emit_ref_reg(A_MOV,S_B,tmpref,NR_AH);
+                dec(tmpref.offset);
                 emit_none(A_SAHF,S_NO);
                 emit_none(A_SAHF,S_NO);
                 cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_AX);
                 cg.ungetcpuregister(current_asmdata.CurrAsmList,NR_AX);
                 tg.ungettemp(current_asmdata.CurrAsmList,tmpref);
                 tg.ungettemp(current_asmdata.CurrAsmList,tmpref);