Lines 1-38
Link Here
|
1 |
--- code/qcommon/vm_x86.c.orig 2013-07-15 18:54:41.000000000 +0000 |
1 |
--- code/qcommon/vm_x86.c.orig 2014-03-23 17:23:18.000000000 +0100 |
2 |
+++ code/qcommon/vm_x86.c |
2 |
+++ code/qcommon/vm_x86.c 2014-03-23 17:24:58.000000000 +0100 |
3 |
@@ -783,7 +783,7 @@ qboolean ConstOptimize(vm_t *vm, int cal |
3 |
@@ -512,7 +512,7 @@ |
4 |
return qtrue; |
4 |
break; |
5 |
|
5 |
} |
6 |
case OP_STORE4: |
6 |
if (code[pc+4] == OP_STORE4) { |
7 |
- EmitMovEAXStack(vm, (vm->dataMask & ~3)); |
7 |
- opt = EmitMovEBXEDI(vm, (vm->dataMask & ~3)); |
8 |
+ EmitMovEAXStack(vm, vm->dataMask); |
8 |
+ opt = EmitMovEBXEDI(vm, (vm->dataMask)); |
9 |
#if idx64 |
9 |
EmitString( "B8" ); // mov eax, 0x12345678 |
10 |
EmitRexString(0x41, "C7 04 01"); // mov dword ptr [r9 + eax], 0x12345678 |
10 |
Emit4( Constant4() ); |
11 |
Emit4(Constant4()); |
11 |
// if (!opt) { |
12 |
@@ -798,7 +798,7 @@ qboolean ConstOptimize(vm_t *vm, int cal |
12 |
@@ -527,7 +527,7 @@ |
13 |
return qtrue; |
13 |
break; |
14 |
|
14 |
} |
15 |
case OP_STORE2: |
15 |
if (code[pc+4] == OP_STORE2) { |
16 |
- EmitMovEAXStack(vm, (vm->dataMask & ~1)); |
16 |
- opt = EmitMovEBXEDI(vm, (vm->dataMask & ~1)); |
17 |
+ EmitMovEAXStack(vm, vm->dataMask); |
17 |
+ opt = EmitMovEBXEDI(vm, (vm->dataMask)); |
18 |
#if idx64 |
18 |
EmitString( "B8" ); // mov eax, 0x12345678 |
19 |
Emit1(0x66); // mov word ptr [r9 + eax], 0x1234 |
19 |
Emit4( Constant4() ); |
20 |
EmitRexString(0x41, "C7 04 01"); |
20 |
// if (!opt) { |
21 |
@@ -1369,7 +1369,7 @@ void VM_Compile(vm_t *vm, vmHeader_t *he |
|
|
22 |
case OP_STORE4: |
23 |
EmitMovEAXStack(vm, 0); |
24 |
EmitString("8B 54 9F FC"); // mov edx, dword ptr -4[edi + ebx * 4] |
25 |
- MASK_REG("E2", vm->dataMask & ~3); // and edx, 0x12345678 |
26 |
+ MASK_REG("E2", vm->dataMask); // and edx, 0x12345678 |
27 |
#if idx64 |
28 |
EmitRexString(0x41, "89 04 11"); // mov dword ptr [r9 + edx], eax |
29 |
#else |
30 |
@@ -1381,7 +1381,7 @@ void VM_Compile(vm_t *vm, vmHeader_t *he |
31 |
case OP_STORE2: |
32 |
EmitMovEAXStack(vm, 0); |
33 |
EmitString("8B 54 9F FC"); // mov edx, dword ptr -4[edi + ebx * 4] |
34 |
- MASK_REG("E2", vm->dataMask & ~1); // and edx, 0x12345678 |
35 |
+ MASK_REG("E2", vm->dataMask); // and edx, 0x12345678 |
36 |
#if idx64 |
37 |
Emit1(0x66); // mov word ptr [r9 + edx], eax |
38 |
EmitRexString(0x41, "89 04 11"); |