Skip to content

Commit

Permalink
- Fix opStack size for vm_x86.c
Browse files Browse the repository at this point in the history
- Change opStack alignment to 16 for vm_x86_64.c
  • Loading branch information
Thilo Schulz committed Jun 27, 2011
1 parent 774ed53 commit 2f502ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/qcommon/vm_x86.c
Expand Up @@ -1714,7 +1714,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;
Expand Down
4 changes: 2 additions & 2 deletions code/qcommon/vm_x86_64.c
Expand Up @@ -1016,7 +1016,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;
Expand Down Expand Up @@ -1063,7 +1063,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;
Expand Down

0 comments on commit 2f502ac

Please sign in to comment.