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