From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,7b37ae94a49a9eec X-Google-Attributes: gid102b75,public X-Google-Thread: 111c93,b79a29863eb727e7 X-Google-Attributes: gid111c93,public From: Andy Glew Subject: Re: [++] x86 FCOS (Was: Re: gcc vs Dec Unix c) Date: 1998/01/13 Message-ID: <34BC41F9.1EF2A296@cs.wisc.edu>#1/1 X-Deja-AN: 315758302 Content-Transfer-Encoding: 7bit References: <884291935.1575288842@dejanews.com> <694nm1$74c$1@news2.xs4all.nl> <884364975.2133262340@dejanews.com> <695t9e$kft$1@agate.berkeley.edu> <884411893.151322629@dejanews.com> <884563899.2019688456@dejanews.com> <34BBB772.16@hda.hydro.com> To: Terje Mathisen Content-Type: text/plain; charset=us-ascii Organization: U Wisc CS (& Intel) Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha,comp.arch > On a PPro, using call/ret in a simple loop like the one aboe, wouldn't > really matter, since (allmost?) all fp operations allow the integer ops > to run simultaneously, so for the code above, the less than 10 cycles > used for a subroutine call would still be completely hidden by the FCOS > execution time. Sorry: the PPro and Pentium II allow FADD, FMUL, FDIV, FSQRT to run simultaneously with integer operations, since these are done in hardware, i.e. via dedicated function units and pipelines, with special sequencers and state machines for FDIV and FSQRT. However, the transcendentals are done in long microcode sequences, that essentially take over the entire micromachine. Thus, except for overlap at the beginning and end, the transcendentals are not done simultaneously with integer operations. (Except for overlap with already started long lasting operations like cache misses, divides, etc. - the pipeline isn't flushed (unless the microcode has a branch misprediction).) If transcendentals were considered more important, they could be done in hardware, with dedicated sequencers (probably sharing access to the multiplier and divider logic, although that shared access would be painful). There are, of course, hardware assists to make the microcode run faster.