From beaf352463f7ae486839fadb4cfc76cf7f3125d2 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Tue, 3 Jul 2007 08:16:21 +0000 Subject: [PATCH] fix stack alignment --- code/qcommon/vm_x86_64.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/qcommon/vm_x86_64.c b/code/qcommon/vm_x86_64.c index 128ddfa0..b549c0e3 100644 --- a/code/qcommon/vm_x86_64.c +++ b/code/qcommon/vm_x86_64.c @@ -991,7 +991,9 @@ int VM_CallCompiled( vm_t *vm, int *args ) { " movl %4,%%edi \r\n" \ " movq %2,%%r10 \r\n" \ " movq %3,%%r8 \r\n" \ + " subq $8, %%rsp # fix alignment as call pushes one value \r\n" \ " callq *%%r10 \r\n" \ + " addq $8, %%rsp \r\n" \ " movl %%edi, %0 \r\n" \ " movq %%rsi, %1 \r\n" \ : "=m" (programStack), "=m" (opStack)