Index: code/qcommon/vm_x86.c =================================================================== --- code/qcommon/vm_x86.c (revision 803) +++ code/qcommon/vm_x86.c (working copy) @@ -211,8 +211,8 @@ // Note the C space function AsmCall is never actually called, and is in fact // arbitrarily named (though this is not true for the MSC version). When a vm // makes a system call, control jumps straight to the doAsmCall label. -void AsmCall( void ) { - asm( CMANG(doAsmCall) ": \n\t" \ +void doAsmCall( void ) { + asm( " pushal \n\t" \ " movl (%%edi),%%eax \n\t" \ " subl $4,%%edi \n\t" \ " orl %%eax,%%eax \n\t" \ @@ -238,7 +238,7 @@ " popl %%ecx \n\t" \ " addl $4,%%edi \n\t" \ "doret: \n\t" \ - " ret \n\t" \ + " popal \n\t" \ : "=rm" (callSyscallNum), "=rm" (callProgramStack), "=rm" (callOpStack) \ : "m" (instructionPointers) \ : "ax", "di", "si", "cx" \ @@ -1198,9 +1198,15 @@ } #else { +#ifdef __APPLE_CC__ + int memProgramStack; + void *memOpStack; + void *memEntryPoint; +#else static int memProgramStack; static void *memOpStack; static void *memEntryPoint; +#endif // __APPLE_CC__ memProgramStack = programStack; memOpStack = opStack;