mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 11:50:04 +02:00
* use the fwait prefixed FSTCW, followed by FWAIT, instead of FNSTCW in
tx86inlinenode.second_trunc_real, when generating code for the 8087 git-svn-id: trunk@26186 -
This commit is contained in:
parent
2d45ea43af
commit
09a3fc74e3
@ -398,8 +398,19 @@ implementation
|
|||||||
begin
|
begin
|
||||||
tg.GetTemp(current_asmdata.CurrAsmList,2,2,tt_normal,oldcw);
|
tg.GetTemp(current_asmdata.CurrAsmList,2,2,tt_normal,oldcw);
|
||||||
tg.GetTemp(current_asmdata.CurrAsmList,2,2,tt_normal,newcw);
|
tg.GetTemp(current_asmdata.CurrAsmList,2,2,tt_normal,newcw);
|
||||||
emit_ref(A_FNSTCW,S_NO,newcw);
|
{$ifdef i8086}
|
||||||
emit_ref(A_FNSTCW,S_NO,oldcw);
|
if current_settings.cputype<=cpu_286 then
|
||||||
|
begin
|
||||||
|
emit_ref(A_FSTCW,S_NO,newcw);
|
||||||
|
emit_ref(A_FSTCW,S_NO,oldcw);
|
||||||
|
emit_none(A_FWAIT,S_NO);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
{$endif i8086}
|
||||||
|
begin
|
||||||
|
emit_ref(A_FNSTCW,S_NO,newcw);
|
||||||
|
emit_ref(A_FNSTCW,S_NO,oldcw);
|
||||||
|
end;
|
||||||
emit_const_ref(A_OR,S_W,$0f00,newcw);
|
emit_const_ref(A_OR,S_W,$0f00,newcw);
|
||||||
load_fpu_location(left);
|
load_fpu_location(left);
|
||||||
emit_ref(A_FLDCW,S_NO,newcw);
|
emit_ref(A_FLDCW,S_NO,newcw);
|
||||||
|
Loading…
Reference in New Issue
Block a user