GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #842

Back to main page of archive

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  

From: PredatorZeta
Subject: `push' instructions (was: Bug fixes)

According to Peter Gerwinski <peter@agnes.dida.physik.uni-essen.de>:
> According to PredatorZeta:
> > Just little clarifying.....:))
> > No. Surely not on 80x86 machines. Look this (is for Pentium):
> > 
> > 1      push (mem)            take 2 cycles NOT pairable 
> > 
> > 2   a) mov (mem), reg     take 1 cycle pairable 
> >                                      AGI Stall (1 cycle+cut off
pairing
> > system)
> >      b) push reg               take 1 cycle pairable
> > 
> >       TOTAL:                    3 cycles
> > 
> > Well, is 2 (not pairable) versus 2 1/2 (not pairable) cycles.....
> > However, with a manual re-ordering it could take only 1 cycle...8-))
> > 
> > Hope this clarify......
> 
> Partially.  As far as I understand the above, it's
> 
>     push (mem)          2 cycles not pairable
> 
>     mov (mem), reg      1 cycle pariable
>     push reg            1 cycle pairable
> 
> so both versions have the same speed, but the second one
> is pairable (-;whatever that means ...

Only theoretically..::)) This is because between the two instructions 
there is an AGI stall, a Pentium hardware-generated LOCK 
instruction.(why? because there is a read after write!!) 8-< This block 
ALL pairing rules and costs 1 cycle. Then: 
1 cycle for the MOV pairable (BUT THAT DON'T PAIR!!)
1 cycle for AGI (block all pipeline!!)
1 cycle for the PUSH pairable
=
2 cycles(not pairable) + 1 pairable= 2 1/2 cycles

> I guess it means that
> it is executed in parallel with a floating point operation,
> right?). 

Yez, but also PUSH (MEM) can do this...

Cya
PrZ

Previous mail   Next mail   Unformatted/full headers
Overview  10 days   Subject   Date   Thread   Author  


Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).