1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-29 05:38:00 +00:00

games/iourbanterror: Fix new patches

Something went with shar extraction.
One new patch came out wrong and the other wasn't created.
Let's put them right now.

PR:		ports/180576
Reported by:	Domininic Fandrey (maintainer)
This commit is contained in:
John Marino 2013-08-31 17:25:08 +00:00
parent 3a64764091
commit f537af5457
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=325818
2 changed files with 42 additions and 49 deletions

View File

@ -1,7 +1,6 @@
diff -r de1eebcbab05 code/qcommon/vm_interpreted.c
--- code/qcommon/vm_interpreted.c Mon Jul 15 20:43:44 2013 +0200
+++ code/qcommon/vm_interpreted.c Tue Jul 23 10:41:47 2013 +0200
@@ -436,21 +436,21 @@
--- code/qcommon/vm_interpreted.c.orig 2013-07-15 18:54:41.000000000 +0000
+++ code/qcommon/vm_interpreted.c
@@ -436,21 +436,21 @@ nextInstruction2:
return 0;
}
#endif
@ -27,7 +26,7 @@ diff -r de1eebcbab05 code/qcommon/vm_interpreted.c
opStackOfs -= 2;
goto nextInstruction;
case OP_STORE1:
@@ -460,7 +460,7 @@
@@ -460,7 +460,7 @@ nextInstruction2:
case OP_ARG:
// single byte offset from programStack
@ -36,47 +35,3 @@ diff -r de1eebcbab05 code/qcommon/vm_interpreted.c
opStackOfs--;
programCounter += 1;
goto nextInstruction;
a05650c847d3648d03593516ce310db4
echo x - games/iourbanterror/files/patch-code-qcommon-vm_x86.c
sed 's/^X//' >games/iourbanterror/files/patch-code-qcommon-vm_x86.c << 'b99229479f1b9014d0f8028a3c1f2c41'
diff -r de1eebcbab05 code/qcommon/vm_x86.c
--- code/qcommon/vm_x86.c Mon Jul 15 20:43:44 2013 +0200
+++ code/qcommon/vm_x86.c Tue Jul 23 10:41:43 2013 +0200
@@ -783,7 +783,7 @@
return qtrue;
case OP_STORE4:
- EmitMovEAXStack(vm, (vm->dataMask & ~3));
+ EmitMovEAXStack(vm, vm->dataMask);
#if idx64
EmitRexString(0x41, "C7 04 01"); // mov dword ptr [r9 + eax], 0x12345678
Emit4(Constant4());
@@ -798,7 +798,7 @@
return qtrue;
case OP_STORE2:
- EmitMovEAXStack(vm, (vm->dataMask & ~1));
+ EmitMovEAXStack(vm, vm->dataMask);
#if idx64
Emit1(0x66); // mov word ptr [r9 + eax], 0x1234
EmitRexString(0x41, "C7 04 01");
@@ -1369,7 +1369,7 @@
case OP_STORE4:
EmitMovEAXStack(vm, 0);
EmitString("8B 54 9F FC"); // mov edx, dword ptr -4[edi + ebx * 4]
- MASK_REG("E2", vm->dataMask & ~3); // and edx, 0x12345678
+ MASK_REG("E2", vm->dataMask); // and edx, 0x12345678
#if idx64
EmitRexString(0x41, "89 04 11"); // mov dword ptr [r9 + edx], eax
#else
@@ -1381,7 +1381,7 @@
case OP_STORE2:
EmitMovEAXStack(vm, 0);
EmitString("8B 54 9F FC"); // mov edx, dword ptr -4[edi + ebx * 4]
- MASK_REG("E2", vm->dataMask & ~1); // and edx, 0x12345678
+ MASK_REG("E2", vm->dataMask); // and edx, 0x12345678
#if idx64
Emit1(0x66); // mov word ptr [r9 + edx], eax
EmitRexString(0x41, "89 04 11");
b99229479f1b9014d0f8028a3c1f2c41
exit

View File

@ -0,0 +1,38 @@
--- code/qcommon/vm_x86.c.orig 2013-07-15 18:54:41.000000000 +0000
+++ code/qcommon/vm_x86.c
@@ -783,7 +783,7 @@ qboolean ConstOptimize(vm_t *vm, int cal
return qtrue;
case OP_STORE4:
- EmitMovEAXStack(vm, (vm->dataMask & ~3));
+ EmitMovEAXStack(vm, vm->dataMask);
#if idx64
EmitRexString(0x41, "C7 04 01"); // mov dword ptr [r9 + eax], 0x12345678
Emit4(Constant4());
@@ -798,7 +798,7 @@ qboolean ConstOptimize(vm_t *vm, int cal
return qtrue;
case OP_STORE2:
- EmitMovEAXStack(vm, (vm->dataMask & ~1));
+ EmitMovEAXStack(vm, vm->dataMask);
#if idx64
Emit1(0x66); // mov word ptr [r9 + eax], 0x1234
EmitRexString(0x41, "C7 04 01");
@@ -1369,7 +1369,7 @@ void VM_Compile(vm_t *vm, vmHeader_t *he
case OP_STORE4:
EmitMovEAXStack(vm, 0);
EmitString("8B 54 9F FC"); // mov edx, dword ptr -4[edi + ebx * 4]
- MASK_REG("E2", vm->dataMask & ~3); // and edx, 0x12345678
+ MASK_REG("E2", vm->dataMask); // and edx, 0x12345678
#if idx64
EmitRexString(0x41, "89 04 11"); // mov dword ptr [r9 + edx], eax
#else
@@ -1381,7 +1381,7 @@ void VM_Compile(vm_t *vm, vmHeader_t *he
case OP_STORE2:
EmitMovEAXStack(vm, 0);
EmitString("8B 54 9F FC"); // mov edx, dword ptr -4[edi + ebx * 4]
- MASK_REG("E2", vm->dataMask & ~1); // and edx, 0x12345678
+ MASK_REG("E2", vm->dataMask); // and edx, 0x12345678
#if idx64
Emit1(0x66); // mov word ptr [r9 + edx], eax
EmitRexString(0x41, "89 04 11");