Board index » delphi » FPU code generation
Frederic
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
Frederic
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
FPU code generation
With BP 7.0, I wrote a procedure containing assembly opcodes for the
FPU. I noticed that the compiler inserts a WAIT instruction after each FPU instruction. I read that this instruction is not necessary anymore on newer processors (I possess a Pentium). Is that true, and if yes, how can I prevent the compiler from generating the WAIT? |
Osmo Ronkan
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:FPU code generationIn article <3642EBB5.6F8C4...@rz-online.de>, QuoteFrederic <frede...@rz-online.de> wrote: Osmo |
Horst Kraem
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:FPU code generationOn Fri, 06 Nov 1998 13:29:41 +0100, Frederic <frede...@rz-online.de> wrote: Quote> With BP 7.0, I wrote a procedure containing assembly opcodes for the Quote> I read that this instruction is not necessary anymore generating the WAIT prefix. In fact the problem is a little bit different. BP doesn't generate asm fldz end; will compile to CD 35 EE { int $33 , byte 2 of opcode } this will be patched before the first execution to 9B D9 EE { WAIT FLDZ } On modern copros like yours this won't slow down the execution because By the way: TP6.0 has an undocumented quirk. If the switch {$G+} is Quote>--test.pas----< begin asm fldz end end. Quote>--------------< cs:000F D9EE fldz PROGRAM.4: end. Quote>---TP 7.0 -------------------< PROGRAM.3: asm fldz end after run time patch PROGRAM.3: asm fldz end Quote>-----------------------------< Horst |
Frederi
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:FPU code generationOsmo Ronkanen schrieb: Quote> Have you tried 286 code generation? generation is used. Computers are a mystery. |
Horst Kraem
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:FPU code generationOn Fri, 06 Nov 1998 18:39:48 +0100, Frederic <frede...@rz-online.de> wrote: Quote> Osmo Ronkanen schrieb: won't produce WAITs. Or did'nt you realize that the code CD33EE fldz which is produced by the FLDZ instruction and which is displayed by TD 9A wait if you step through the instruction because the called interrupt Regards |
Robert AH Prin
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:FPU code generationIn article <3642EBB5.6F8C4...@rz-online.de>, Frederic <frede...@rz-online.de> wrote: Quote> With BP 7.0, I wrote a procedure containing assembly opcodes for the of the run-time library coprocessor emulator replacing the emulated instructions, if a real FPU is present, by real FPU instructions. In TP6 you can generate "pure" FPU instructions using the G+ directive, except for these ones: FCLEX (Use the FN.. ones) AFAIK, TP/BP7 always generate emulated instructions, resulting in the WAIT. However, by using Norbert Juffa's TPL60N19.ZIP or (I don't use it, so not HTH, Robert -----------== Posted via Deja News, The Discussion Network ==---------- |
Frederi
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:FPU code generationHorst Kraemer schrieb: Quote> Please show me an example where TP7.0 BP7.0 (this was your question) my short life. Sorry :-) |