home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 3,066 of 4,675   
   Anton Ertl to aen@nospicedham.spamtrap.com   
   Re: cycles   
   12 Nov 17 06:54:04   
   
   From: anton@nospicedham.mips.complang.tuwien.ac.at   
      
   aen@nospicedham.spamtrap.com writes:   
   >When I change it to:   
   >#  mov     rbx,1000000   
   >  TSCStart   
   >.rept 1000000   
   >                                # fus p015 p0 p1 p5 p2 p3 p4 lat reci   
   >1:mov     rdi,0x1234567890123456 # 1   1   x  x  x            1  0.33   
   >  call    bcd2bin               #  2   2         1     1  1       2   
   >#  dec     rbx                   #  1   1   x  x  x            1  0.33   
   >#  jnz     1b                    #  1   1         1            0   2   
   >.endr   
   ># 12 cycles   
   >  TSCEnd   
   >   
   >it gives ~23,000,000 too, which is because the call comes from a   
   >different place every time???   
      
   The RETs should be correctly predicted thanks to the return stack, but   
   the calls are effectively misspredicted: Every call is freshly decoded   
   here, so you incur the full latency of the call instruction (from   
   istruction fetch to execution) instead of the optimized   
   branch-predicted latency of 1 cycle.   
      
   - anton   
   --   
   M. Anton Ertl                    Some things have to be seen to be believed   
   anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen   
   http://www.complang.tuwien.ac.at/anton/home.html   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca