aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon/vm_x86.c
diff options
context:
space:
mode:
Diffstat (limited to 'code/qcommon/vm_x86.c')
-rw-r--r--code/qcommon/vm_x86.c6
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;