From 2778b5b75f0be066b998be4c5f1d93bea40aceb3 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Mon, 27 Jun 2011 20:22:32 +0000 Subject: - Fix opStack size for vm_x86.c - Change opStack alignment to 16 for vm_x86_64.c --- src/qcommon/vm_x86.c | 2 +- src/qcommon/vm_x86_64.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qcommon/vm_x86.c b/src/qcommon/vm_x86.c index 91ab5cc2..c5dcfddd 100644 --- a/src/qcommon/vm_x86.c +++ b/src/qcommon/vm_x86.c @@ -1715,7 +1715,7 @@ This function is called directly by the generated code int VM_CallCompiled(vm_t *vm, int *args) { - byte stack[OPSTACK_SIZE * 4 + 15]; + byte stack[OPSTACK_SIZE + 15]; void *entryPoint; int programCounter; int programStack, stackOnEntry; diff --git a/src/qcommon/vm_x86_64.c b/src/qcommon/vm_x86_64.c index 93b56a37..1071e79f 100644 --- a/src/qcommon/vm_x86_64.c +++ b/src/qcommon/vm_x86_64.c @@ -1017,7 +1017,7 @@ static char* memData; int VM_CallCompiled(vm_t *vm, int *args) { - int stack[OPSTACK_SIZE + 3]; + int stack[OPSTACK_SIZE + 15]; int programCounter; int programStack; int stackOnEntry; @@ -1064,7 +1064,7 @@ int VM_CallCompiled(vm_t *vm, int *args) // off we go into generated code... entryPoint = getentrypoint(vm); - opStack = PADP(stack, 4); + opStack = PADP(stack, 16); *opStack = 0xDEADBEEF; opStackRet = 0; -- cgit