From 6fdadb624894f047c742d7e0873d1e1201e794b8 Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 19 Nov 2013 23:22:49 +0000 Subject: [PATCH] * 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 - --- compiler/x86/nx86add.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/x86/nx86add.pas b/compiler/x86/nx86add.pas index 32d55d095c..9a8913442b 100644 --- a/compiler/x86/nx86add.pas +++ b/compiler/x86/nx86add.pas @@ -1234,7 +1234,8 @@ unit nx86add; if current_settings.cputype < cpu_286 then begin 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); emit_ref_reg(A_MOV,S_W,tmpref,NR_AX); emit_none(A_SAHF,S_NO);