Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-23-2003, 01:09 PM
daeken_bb
Discordant
 
Join Date: Mar 2003
Location: Chambersburg, PA
Posts: 469
Default Patch to compile crc32.cpp on GCC 3.3.x

Have fun:
Code:
--- common/crc32.old	Mon Dec 22 13:35:50 2003
+++ common/crc32.cpp	Mon Dec 22 13:30:41 2003
@@ -161,17 +161,15 @@
 	return crc32;
 }
 #elif defined(i386)
-		register uint32  val __asm ( "ax" );
-		val = crc32;
 
 __asm __volatile (
 		"xorl	%%ebx, %%ebx\n"
-		"movl	%1, %%esi\n" 
-		"movl	%2, %%ecx\n" 
+    "movl $crc32, %%eax\n"
+		"movl	%0, %%esi\n" 
+		"movl	%1, %%ecx\n" 
 		"movl	$CRC32Table, %%edi\n"
-		"shrl	$2, %%ecx\n"
+		"shrl	$0, %%ecx\n"
 		"jz	1f\n"
-
 		".align 4\n"
 		"0:\n"
 		"movb	%%al, %%bl\n"
@@ -203,7 +201,7 @@
 		"jnz	0b\n"
 
 		"1:\n"
-		"movl	%2, %%ecx\n"
+		"movl	%1, %%ecx\n"
 		"andl	$3, %%ecx\n"
 		"jz	2f\n"
 
@@ -229,11 +227,11 @@
 		"xorl	(%%edi,%%ebx,4), %%eax\n"
 	"2:\n"
 		:
-		: "a" (val), "g" (buf), "g" (bufsize)
+		: "g" (buf), "g" (bufsize)
 		: "ax", "bx", "cx", "dx", "si", "di"
 	);
 	
-	return val;
+	return crc32;
 }
 #else
 	for(uint32 i=0; i < bufsize; i++)
Edit: Code tags - kathgar
__________________
Keep me unemployed and working on OpenEQ, PM me about donating

Check out my deviantART page at http://daeken.deviantart.com/
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:12 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3