summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-office/openoffice/files/1.0.3/openoffice-1.0.1-fix-asm.patch')
-rw-r--r--app-office/openoffice/files/1.0.3/openoffice-1.0.1-fix-asm.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/app-office/openoffice/files/1.0.3/openoffice-1.0.1-fix-asm.patch b/app-office/openoffice/files/1.0.3/openoffice-1.0.1-fix-asm.patch
new file mode 100644
index 000000000000..476cd704bfec
--- /dev/null
+++ b/app-office/openoffice/files/1.0.3/openoffice-1.0.1-fix-asm.patch
@@ -0,0 +1,86 @@
+--- oo_1.0_src/sal/osl/unx/interlck.c.jj Wed May 2 17:03:13 2001
++++ oo_1.0_src/sal/osl/unx/interlck.c Thu May 30 10:45:19 2002
+@@ -83,9 +83,11 @@ oslInterlockedCount SAL_CALL osl_increme
+ "lock\n\t"
+ "xadd %0, %2\n\t"
+ "incl %0"
+- : "=a" (nCount), "=m" (*pCount)
++ : "=&r" (nCount), "=m" (*pCount)
+ : "m" (*pCount)
+ : "memory");
++
++ return nCount;
+ }
+
+ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* pCount)
+@@ -97,9 +99,11 @@ oslInterlockedCount SAL_CALL osl_decreme
+ "lock\n\t"
+ "xadd %0, %2\n\t"
+ "decl %0"
+- : "=a" (nCount), "=m" (*pCount)
++ : "=&r" (nCount), "=m" (*pCount)
+ : "m" (*pCount)
+ : "memory");
++
++ return nCount;
+ }
+
+ #elif defined ( GCC ) && defined ( POWERPC )
+@@ -117,7 +121,7 @@ oslInterlockedCount SAL_CALL osl_increme
+ " addi %0,%0,1\n\t"
+ " stwcx. %0,0,%2\n\t"
+ " bne- 1b"
+- : "=r" (nCount), "=m" (*pCount)
++ : "=&r" (nCount), "=m" (*pCount)
+ : "r" (pCount)
+ : "r4", "memory");
+
+@@ -134,7 +138,7 @@ oslInterlockedCount SAL_CALL osl_decreme
+ " subi %0,%0,1\n\t"
+ " stwcx. %0,0,%2\n\t"
+ " bne- 1b"
+- : "=r" (nCount), "=m" (*pCount)
++ : "=&r" (nCount), "=m" (*pCount)
+ : "r" (pCount)
+ : "r4", "memory");
+
+--- oo_1.0_src/bridges/source/c_uno/intelx86.cxx.jj Wed Apr 18 13:05:48 2001
++++ oo_1.0_src/bridges/source/c_uno/intelx86.cxx Thu May 30 11:37:26 2002
+@@ -95,24 +95,21 @@ Lcopy: sub eax, 4
+ add esp, eax
+ }
+ #elif GCC
++ int ecx, edx;
++
+ __asm__
+ (
+- "mov %2, %%eax\n\t"
+- "mov %%eax, %%ecx\n\t"
+- "shl $2, %%eax\n\t"
+- "add %1, %%eax\n"
+- "Lcopy:\n\t"
+- "sub $4, %%eax\n\t"
+- "pushl (%%eax)\n\t"
+- "dec %%ecx\n\t"
+- "jne Lcopy\n\t"
+- "mov %0, %%eax\n\t"
+- "call *%%eax\n\t"
+- "mov %%eax, %3\n"
+- "mov %2, %%eax\n\t"
+- "shl $2, %%eax\n\t"
+- "add %%eax, %%esp\n\t"
+- : : "m"(fptr), "m"(pParams), "m"(nParams), "m"(retVal)
++ "1:\n\t"
++ "subl $4, %0\n\t"
++ "pushl (%0)\n\t"
++ "decl %1\n\t"
++ "jne 1b\n\t"
++ "call *%2\n\t"
++ "leal 0(%%esp,%3,4), %%esp\n\t"
++ : "=a"(retVal), "=c"(ecx), "=d"(edx)
++ : "S"(nParams),
++ "0" (((int *) pParams) + nParams), "1" (nParams), "2"(fptr)
++ : "memory", "cc"
+ );
+ #else
+ #error "### unsupported x86 compiler!"