Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Linux Servers

Support::Linux Servers Support forum for Linux EQEMu users.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 03-14-2010, 05:09 PM
snorkle
Fire Beetle
 
Join Date: Oct 2009
Posts: 3
Default

I had to make some changes to get the old VZTZ source to work in Linux. I'm not sure what revision their source was based on but I ended up scrapping it for 8.0. Here's one of the things I had to change to get it to work with newer gcc versions:

Code:
vztzfebsource-read-only/common$ svn diff crc32.cpp
Index: crc32.cpp
===================================================================
--- crc32.cpp   (revision 7)
+++ crc32.cpp   (working copy)
@@ -112,6 +112,14 @@
 #undef i386    //darwin seems to think we are generating PIC, and we clobber ebx
 #endif

+/* Some 64bit systems do not like the i386 assembly code below. However, some 64bit
+   systems do work with the assembly code below. We #undef i386 to be on the safe
+   side if we are compiling 64bit. */
+
+#ifdef __x86_64__
+#undef i386
+#endif
+
 uint32 CRC32::Update(const int8* buf, uint32 bufsize, uint32 crc32) {
 #if defined(WIN32)
    // Register use:
@@ -167,8 +175,8 @@
 #elif defined(i386)
        register uint32  val __asm ( "ax" );
        val = crc32;
-
 __asm __volatile (
+       "push   %%ebx\n"
        "xorl   %%ebx, %%ebx\n"
        "movl   %1, %%esi\n"
        "movl   %2, %%ecx\n"
@@ -232,9 +240,10 @@
        "xorb   2(%%esi), %%bl\n"
        "xorl   (%%edi,%%ebx,4), %%eax\n"
    "2:\n"
+       "pop  %%ebx\n"
        :
        : "a" (val), "g" (buf), "g" (bufsize)
-       : "bx", "cx", "dx", "si", "di"
+       : "cx", "dx", "si", "di"
    );

    return val;

Last edited by gaeorn; 03-29-2010 at 02:16 AM.. Reason: add code tags around code block
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 04:49 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