From 0020a2ed10b58c3b0f5609e201efdaa266641e25 Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 19 Nov 2013 01:26:57 +0000 Subject: [PATCH] + when targeting the i8087, emit FWAIT prefix manually for the 8087 instructions that require it in the NASM asm writer, since NASM doesn't do it itself. git-svn-id: trunk@26107 - --- compiler/x86/agx86nsm.pas | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compiler/x86/agx86nsm.pas b/compiler/x86/agx86nsm.pas index 9d86dd6d41..9aa3c10be3 100644 --- a/compiler/x86/agx86nsm.pas +++ b/compiler/x86/agx86nsm.pas @@ -972,6 +972,13 @@ interface AsmWriteln(#9#9'DB'#9'09bh') else begin +{$ifdef i8086} + { nickysn note: I don't know if the 187 requires FWAIT before + every instruction like the 8087, so I'm including it just in case } + if (current_settings.cputype<=cpu_186) and + requires_fwait_on_8087(fixed_opcode) then + AsmWriteln(#9#9'DB'#9'09bh'); +{$endif i8086} {$ifndef i8086} { We need to explicitely set word prefix to get selectors