[quake3] r191 - trunk/code/qcommon

Ludwig Nussel ludwig.nussel at suse.de
Fri Oct 28 08:32:06 EDT 2005


Tim Angus wrote:
> On 27 Oct 2005 18:38:25 -0400 DONOTREPLY at icculus.org wrote:
> > Author: tma
> > Date: 2005-10-27 18:38:25 -0400 (Thu, 27 Oct 2005)
> > New Revision: 191
> > 
> > Modified:
> >    trunk/code/qcommon/vm.c
> > Log:
> > * Fix the x86 vm

I'm sorry for causing breakage like this yesterday. I was just too
excited that I finally found the bug that caused vm_x86_64 to crash.

> > 
> > Modified: trunk/code/qcommon/vm.c
> > ===================================================================
> > --- trunk/code/qcommon/vm.c	2005-10-27 22:05:38 UTC (rev 190)
> > +++ trunk/code/qcommon/vm.c	2005-10-27 22:38:25 UTC (rev 191)
> > @@ -749,10 +749,10 @@
> >  #ifdef __i386__ // i386 calling convention doesn't need conversion
> >  #if defined(HAVE_VM_COMPILED)
> >  		if ( vm->compiled )
> > -			r = VM_CallCompiled( vm, (int*)callnum );
> > +			r = VM_CallCompiled( vm, (int*)&callnum );
> >  		else
> >  #endif
> > -			r = VM_CallInterpreted( vm, (int*)callnum );
> > +			r = VM_CallInterpreted( vm, (int*)&callnum );
> >  #else
> >  		struct {
> >  			int callnum;
> 
> Perhaps we should just use the platform independant calling convention
> on x86 too? I can't imagine it being that expensive in practical terms.

For better readability VM_CallCompiled and VM_CallInterpreted could
be made variadic just like VM_Call. If extra handling is needed it's
hidden behind the va_* macros then.

cu
Ludwig

-- 
 (o_   Ludwig Nussel
 //\   SUSE LINUX Products GmbH, Development
 V_/_  http://www.suse.de/



More information about the quake3 mailing list