summaryrefslogtreecommitdiff
path: root/src/qcommon
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcommon')
-rw-r--r--src/qcommon/vm_x86.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qcommon/vm_x86.c b/src/qcommon/vm_x86.c
index e1ba73a0..5ab69c9a 100644
--- a/src/qcommon/vm_x86.c
+++ b/src/qcommon/vm_x86.c
@@ -1545,10 +1545,12 @@ int VM_CallCompiled( vm_t *vm, int *args ) {
}
#else
__asm__ volatile(
+ "push %%eax\r\n"
"call *%2\r\n"
+ "pop %%eax\r\n"
: "+S" (programStack), "+D" (opStack)
- : "r" (vm->codeBase + vm->entryOfs)
- : "cc", "memory", "%eax", "%ebx", "%ecx", "%edx"
+ : "a" (vm->codeBase + vm->entryOfs)
+ : "cc", "memory", "%ebx", "%ecx", "%edx"
);
#endif