Thread: Debian Lenny
View Single Post
  #6  
Old 11-06-2008, 04:25 PM
Kobaz
Hill Giant
 
Join Date: Nov 2008
Location: Gold Coast, Oz
Posts: 119
Default

I'm no expert on asm coding by any means, but in crc32.cpp, why does the code go:

Code:
__asm __volatile (
             "xorl   %%ebx, %%ebx\n"
              "movl   %1, %%esi\n"   

(cut many lines)

              "xorl   (%%edi,%%ebx,4), %%eax\n"
      "2:\n"
              :
              : "a" (val), "g" (buf), "g" (bufsize)
              : "bx", "cx", "dx", "si", "di"
      );
        
      return val;
instead of:

Code:
__asm __volatile (

             "push  %%ebx"

             "xorl   %%ebx, %%ebx\n"
              "movl   %1, %%esi\n"   

(cut many lines)

              "xorl   (%%edi,%%ebx,4), %%eax\n"

              "pop  %%ebx"

      "2:\n"
              :
              : "a" (val), "g" (buf), "g" (bufsize)
              : "cx", "dx", "si", "di"
      );
        
      return val;
This bug has nothing to do with the Perl version btw.
Reply With Quote