summaryrefslogtreecommitdiff
path: root/src/qcommon
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-06-23 00:00:27 +0000
committerTim Angus <tim@ngus.net>2013-01-10 21:51:33 +0000
commit1677472bc312791c5e6bd634a0044aa4d7f71a07 (patch)
tree542b361bd4e51f415c35c5cc5f63a4566dc4d644 /src/qcommon
parentaa3e32997bf3decdce451c8a6a915c27a489d84c (diff)
Allow recursive VM entry for VM operations as well
Diffstat (limited to 'src/qcommon')
-rw-r--r--src/qcommon/vm_x86.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qcommon/vm_x86.c b/src/qcommon/vm_x86.c
index a424949d..91ab5cc2 100644
--- a/src/qcommon/vm_x86.c
+++ b/src/qcommon/vm_x86.c
@@ -433,6 +433,11 @@ static void DoSyscall(void)
);
#endif
+ // save currentVM so as to allow for recursive VM entry
+ savedVM = currentVM;
+ // modify VM stack pointer for recursive VM entry
+ currentVM->programStack = programStack - 4;
+
if(syscallNum < 0)
{
int *data;
@@ -441,13 +446,8 @@ static void DoSyscall(void)
intptr_t args[11];
#endif
- // save currentVM so as to allow for recursive VM entry
- savedVM = currentVM;
data = (int *) (savedVM->dataBase + programStack + 4);
- // modify VM stack pointer for recursive VM entry
- savedVM->programStack = programStack - 4;
-
#if idx64
args[0] = ~syscallNum;
for(index = 1; index < ARRAY_LEN(args); index++)
@@ -458,8 +458,6 @@ static void DoSyscall(void)
data[0] = ~syscallNum;
opStackBase[opStackOfs + 1] = savedVM->systemCall(data);
#endif
-
- currentVM = savedVM;
}
else
{
@@ -479,6 +477,8 @@ static void DoSyscall(void)
break;
}
}
+
+ currentVM = savedVM;
}
/*