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,064 of 4,675   
   aen@nospicedham.spamtrap.com to Anton Ertl   
   Re: cycles   
   11 Nov 17 19:35:26   
   
   On Sat, 11 Nov 2017 16:39:38 GMT,   
   anton@nospicedham.mips.complang.tuwien.ac.at (Anton Ertl) wrote:   
      
   > ...   
   >resource constraints.  If the OP wants to measure latency, he/she   
   >needs to make the input of bcd2bin repend on the result of the   
   >previous invocation, maybe by using   
   >   
   >add rdi,    
   >   
   >instead of the "mov rdi, 0x123...."   
   > ...   
      
   When I put a comment in here:   
   1:#mov     rdi,0x1234567890123456 # 1   1   x  x  x            1  0.33   
      
   the count goes up to ~23,000,000.  The output of the subroutine would   
   of course be wrong since the input isn't a BCD anymore.   
      
   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???   
   --   
   aen   
      
   --- 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