home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / lang / asm / 572 < prev    next >
Encoding:
Text File  |  1993-01-21  |  2.1 KB  |  47 lines

  1. Newsgroups: alt.lang.asm
  2. Path: sparky!uunet!mcsun!sunic!fuw.edu.pl!cocos!jt
  3. From: jt@fuw.edu.pl (Jerzy Tarasiuk)
  4. Subject: Re: FPU
  5. In-Reply-To: riouxm@JSP.UMontreal.CA's message of Wed, 13 Jan 1993 20:56:44 GMT
  6. Message-ID: <JT.93Jan21122000@fizyk1.fuw.edu.pl>
  7. Sender: news@fuw.edu.pl
  8. Nntp-Posting-Host: fizyk1
  9. Organization: Warsaw University Physics Dept.
  10. References: <1993Jan13.205644.1035@cc.umontreal.ca>
  11. Date: Thu, 21 Jan 1993 11:20:00 GMT
  12. Lines: 33
  13.  
  14. >>>>> On Wed, 13 Jan 1993 20:56:44 GMT, riouxm@JSP.UMontreal.CA (Rioux Martin) said:
  15. Rioux> 1. OK, Here's my question, Is it possible to use (EAX EBX ...) with the FPU
  16. Rioux> commands ex.( FMUL EAX ) IF not how can you speed up the process..?
  17.  
  18. CPU and FPU communicate through I/O ports (286/287 or better) F0..FF,
  19. but I don't know if it is possible to use these ports by instructions
  20. to send EAX directly to FPU. Seems opcode should be send to port F8,
  21. operand to FC (or 800000F8,800000FC on 386). But I couldn't get it
  22. working. To get maximum speed without register to FPU transfer: store
  23. EAX in memory at doubleword-aligned address using register (e.g. BX)
  24. as address: mov [BX],EAX followed by FILD [BX]; note conversion from
  25. integer to FPU-s internal form takes about 10 times more time than
  26. data transfer from CPU to memory and from memory to FPU. 
  27.  
  28. Why you need transfer data directly from CPU to FPU ?
  29. They use different data formats.
  30. FPU loads 32-bit REAL in 20 clock cycles, 64-bit REAL in 25,
  31. while loading 32-bit INTEGER takes 45 and 16-bit - 61!
  32. Note CPU can access memory in 2-3 clock cycles. :-)
  33.  
  34. Rioux> 2. When I use FMUL TEMP,ST(3) I get an ( extra character on line ) I think 
  35. Rioux> I used that line before ...!!! but now it doesn't work anymore... HELP!
  36.  
  37. Opcode specifying any of ST() other than ST(0) cannot specify memory
  38. address or CPU register because ST index uses same opcode bits as
  39. memory R/M field specifying memory addressing mode.
  40. Can:    FMUL TEMP - multiply ST(0) by REAL TEMP
  41.     FIMUL TEMP - multiply ST(0) by INTEGER TEMP
  42.     FMUL ST(i) - multiply ST(0) by ST(i)
  43.     FMUL ST(i),ST(0) - multiply ST(i) by ST(0)
  44. Result comes to ST(0) except the last when it comes to ST(i).
  45.  
  46. Jerzy Tarasiuk <jt@fuw.edu.pl>
  47.