diff options
author | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-10-13 14:47:00 +0000 |
---|---|---|
committer | tma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-10-13 14:47:00 +0000 |
commit | 2409247307a2fdf0266a8bd7cd39526f06bea0d3 (patch) | |
tree | 3db0f1aeac11c230a2cfeca37c911cb2fec92d04 /code/qcommon/vm_x86.c | |
parent | 0ef0850cce08475bd990dd1d3e8865e48995b0ee (diff) | |
download | ioquake3-aero-2409247307a2fdf0266a8bd7cd39526f06bea0d3.tar.gz ioquake3-aero-2409247307a2fdf0266a8bd7cd39526f06bea0d3.zip |
* (Non-trivial) fix to the "opStack corrupted in compiled code" bug
git-svn-id: svn://svn.icculus.org/quake3/trunk@156 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon/vm_x86.c')
-rw-r--r-- | code/qcommon/vm_x86.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/code/qcommon/vm_x86.c b/code/qcommon/vm_x86.c index a46161a..63b3e1b 100644 --- a/code/qcommon/vm_x86.c +++ b/code/qcommon/vm_x86.c @@ -419,6 +419,12 @@ void VM_Compile( vm_t *vm, vmHeader_t *header ) { Com_Memset(jused, 0, header->instructionCount+2); + // ensure that the optimisation pass knows about all the jump + // table targets + for( i = 0; i < vm->numJumpTableTargets; i++ ) { + jused[ *(int *)(vm->jumpTableTargets + ( i * sizeof( int ) ) ) ] = 1; + } + for(pass=0;pass<2;pass++) { oc0 = -23423; oc1 = -234354; |