A minor optimisation for lazy compilers.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3259 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
3b9f4c9fbb
commit
bde52736c2
1 changed files with 15 additions and 6 deletions
|
@ -474,13 +474,22 @@ void QVM_UnLoadVM(qvm_t *qvm)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** QVM_Goto
|
** QVM_Goto
|
||||||
|
|
||||||
|
(inlined this the old fashioned way)
|
||||||
*/
|
*/
|
||||||
static void inline QVM_Goto(qvm_t *vm, int addr)
|
#define QVM_Goto(vm,addr) \
|
||||||
{
|
do{ \
|
||||||
if(addr<0 || addr>vm->len_cs)
|
if(addr<0 || addr>vm->len_cs) \
|
||||||
Sys_Error("VM run time error: program jumped off to hyperspace\n");
|
Sys_Error("VM run time error: program jumped off to hyperspace\n"); \
|
||||||
vm->pc=vm->cs+addr*2;
|
vm->pc=vm->cs+addr*2; \
|
||||||
}
|
} while(0)
|
||||||
|
|
||||||
|
//static void inline QVM_Goto(qvm_t *vm, int addr)
|
||||||
|
//{
|
||||||
|
// if(addr<0 || addr>vm->len_cs)
|
||||||
|
// Sys_Error("VM run time error: program jumped off to hyperspace\n");
|
||||||
|
// vm->pc=vm->cs+addr*2;
|
||||||
|
//}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** QVM_Call
|
** QVM_Call
|
||||||
|
|
Loading…
Reference in a new issue