Quote:
Originally Posted by Angelox
I think you got your reply cut in half - happened to me on this very same thread
|
Yeah, lol. Let's try this again...
Quote:
Originally Posted by Angelox
I wonder if anyone might know what or why the cause for this. I tried other versions of gcc with the same results, and this only happens on on of my pcs, and even will sometimes go through with the compile.
Code:
../common/crc32.cpp: In static member function ‘static uint32 CRC32::Update(const int8*, uint32, uint32)’:
../common/crc32.cpp:239: error: PIC register ‘bx’ clobbered in ‘asm’
make: *** [../common/crc32.o] Error 1
|
Teh intertubes indicates it's an issue specific to GCC 3.4. This is the suspect code:
Code:
__asm __volatile (
"xorl %%ebx, %%ebx\n"
"movl %1, %%esi\n"
"movl %2, %%ecx\n"
"movl $CRC32Table, %%edi\n"
"shrl $2, %%ecx\n"
"jz 1f\n"
".align 4\n"
"0:\n"
"movb %%al, %%bl\n"
"movl (%%esi), %%edx\n"
"shrl $8, %%eax\n"
"xorb %%dl, %%bl\n"
"shrl $8, %%edx\n"
"xorl (%%edi,%%ebx,4), %%eax\n"
"movb %%al, %%bl\n"
"shrl $8, %%eax\n"
"xorb %%dl, %%bl\n"
"shrl $8, %%edx\n"
"xorl (%%edi,%%ebx,4), %%eax\n"
"movb %%al, %%bl\n"
"shrl $8, %%eax\n"
"xorb %%dl, %%bl\n"
"movb %%dh, %%dl\n"
"xorl (%%edi,%%ebx,4), %%eax\n"
"movb %%al, %%bl\n"
"shrl $8, %%eax\n"
"xorb %%dl, %%bl\n"
"addl $4, %%esi\n"
"xorl (%%edi,%%ebx,4), %%eax\n"
"decl %%ecx\n"
"jnz 0b\n"
"1:\n"
"movl %2, %%ecx\n"
"andl $3, %%ecx\n"
"jz 2f\n"
"movb %%al, %%bl\n"
"shrl $8, %%eax\n"
"xorb (%%esi), %%bl\n"
"xorl (%%edi,%%ebx,4), %%eax\n"
"decl %%ecx\n"
"jz 2f\n"
"movb %%al, %%bl\n"
"shrl $8, %%eax\n"
"xorb 1(%%esi), %%bl\n"
"xorl (%%edi,%%ebx,4), %%eax\n"
"decl %%ecx\n"
"jz 2f\n"
"movb %%al, %%bl\n"
"shrl $8, %%eax\n"
"xorb 2(%%esi), %%bl\n"
"xorl (%%edi,%%ebx,4), %%eax\n"
"2:\n"
:
: "a" (val), "g" (buf), "g" (bufsize)
: "bx", "cx", "dx", "si", "di"
);
return val;
}
My only recommendation if it's happening with multiple versions of GCC is to completely get rid of them, then start over from scratch, since it looks like there's something from 3.4 that's getting shared w/ everything else.