Browse Source

+ 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 -

nickysn 11 years ago
parent
commit
0020a2ed10
1 changed files with 7 additions and 0 deletions
  1. 7 0
      compiler/x86/agx86nsm.pas

+ 7 - 0
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