/[packages]/updates/5/libreoffice/current/SOURCES/0001-ppc64-simplify-this-a-little.patch
ViewVC logotype

Contents of /updates/5/libreoffice/current/SOURCES/0001-ppc64-simplify-this-a-little.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 896529 - (show annotations) (download)
Thu Oct 29 21:56:40 2015 UTC (8 years, 5 months ago) by tv
File size: 5533 byte(s)
new release
1 From c56030a7b50e589de97bb23da65dd9ca2c8d41d3 Mon Sep 17 00:00:00 2001
2 From: Caolan McNamara <caolanm@redhat.com>
3 Date: Fri, 10 Jul 2015 16:00:22 +0100
4 Subject: [PATCH 1/2] ppc64: simplify this a little
5
6 Change-Id: I8166f65625d389a604750852d6d5a4fee25a88fa
7 ---
8 .../cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx | 61 +++++++++-------------
9 1 file changed, 24 insertions(+), 37 deletions(-)
10
11 diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
12 index 4013076..81d3d5c 100644
13 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
14 +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
15 @@ -124,6 +124,8 @@ void MapReturn(long r3, long r4, double dret, typelib_TypeDescriptionReference*
16 if (pReturnType->pType->nSize > 8)
17 pRegisters[1] = r4;
18 }
19 +#else
20 + (void)r4;
21 #endif
22 default:
23 break;
24 @@ -185,45 +187,29 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
25
26 // fill registers
27 __asm__ __volatile__ (
28 - "ld 3, 0(%0)\n\t"
29 - "ld 4, 8(%0)\n\t"
30 - "ld 5, 16(%0)\n\t"
31 - "ld 6, 24(%0)\n\t"
32 - "ld 7, 32(%0)\n\t"
33 - "ld 8, 40(%0)\n\t"
34 - "ld 9, 48(%0)\n\t"
35 - "ld 10, 56(%0)\n\t"
36 - "lfd 1, 0(%1)\n\t"
37 - "lfd 2, 8(%1)\n\t"
38 - "lfd 3, 16(%1)\n\t"
39 - "lfd 4, 24(%1)\n\t"
40 - "lfd 5, 32(%1)\n\t"
41 - "lfd 6, 40(%1)\n\t"
42 - "lfd 7, 48(%1)\n\t"
43 - "lfd 8, 56(%1)\n\t"
44 - "lfd 9, 64(%1)\n\t"
45 - "lfd 10, 72(%1)\n\t"
46 - "lfd 11, 80(%1)\n\t"
47 - "lfd 12, 88(%1)\n\t"
48 - "lfd 13, 96(%1)\n\t"
49 - : : "r" (pGPR), "r" (pFPR)
50 - : "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",
51 - "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", "fr8", "fr9",
52 - "fr10", "fr11", "fr12", "fr13"
53 + "lfd 1, 0(%0)\n\t"
54 + "lfd 2, 8(%0)\n\t"
55 + "lfd 3, 16(%0)\n\t"
56 + "lfd 4, 24(%0)\n\t"
57 + "lfd 5, 32(%0)\n\t"
58 + "lfd 6, 40(%0)\n\t"
59 + "lfd 7, 48(%0)\n\t"
60 + "lfd 8, 56(%0)\n\t"
61 + "lfd 9, 64(%0)\n\t"
62 + "lfd 10, 72(%0)\n\t"
63 + "lfd 11, 80(%0)\n\t"
64 + "lfd 12, 88(%0)\n\t"
65 + "lfd 13, 96(%0)\n\t"
66 + : : "r" (pFPR)
67 + : "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", "fr8", "fr9",
68 + "fr10", "fr11", "fr12", "fr13"
69 );
70
71 // tell gcc that r3 to r11 are not available to it for doing the TOC and exception munge on the func call
72 register sal_uInt64 r3 asm("r3");
73 register sal_uInt64 r4 asm("r4");
74 - register sal_uInt64 r5 asm("r5");
75 - register sal_uInt64 r6 asm("r6");
76 - register sal_uInt64 r7 asm("r7");
77 - register sal_uInt64 r8 asm("r8");
78 - register sal_uInt64 r9 asm("r9");
79 - register sal_uInt64 r10 asm("r10");
80 - register sal_uInt64 r11 asm("r11");
81
82 - (*pFunc)(r3, r4, r5, r6, r7, r8, r9, r10);
83 + (*pFunc)(pGPR[0], pGPR[1], pGPR[2], pGPR[3], pGPR[4], pGPR[5], pGPR[6], pGPR[7]);
84
85 // get return value
86 __asm__ __volatile__ (
87 @@ -375,7 +361,6 @@ static void cpp_call(
88
89 if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
90 {
91 -// uno_copyAndConvertData( pCppArgs[nPos] = alloca( 8 ), pUnoArgs[nPos], pParamTypeDescr,
92 uno_copyAndConvertData( pCppArgs[nPos] = pStack, pUnoArgs[nPos], pParamTypeDescr,
93 pThis->getBridge()->getUno2Cpp() );
94 switch (pParamTypeDescr->eTypeClass)
95 @@ -383,7 +368,7 @@ static void cpp_call(
96 case typelib_TypeClass_HYPER:
97 case typelib_TypeClass_UNSIGNED_HYPER:
98 #if OSL_DEBUG_LEVEL > 2
99 - fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]);
100 + fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]);
101 #endif
102 INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow );
103 break;
104 @@ -391,7 +376,7 @@ static void cpp_call(
105 case typelib_TypeClass_UNSIGNED_LONG:
106 case typelib_TypeClass_ENUM:
107 #if OSL_DEBUG_LEVEL > 2
108 - fprintf(stderr, "long is %x\n", pCppArgs[nPos]);
109 + fprintf(stderr, "long is %x\n", pCppArgs[nPos]);
110 #endif
111 INSERT_INT32( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow );
112 break;
113 @@ -406,10 +391,12 @@ static void cpp_call(
114 break;
115 case typelib_TypeClass_FLOAT:
116 INSERT_FLOAT( pCppArgs[nPos], nFPR, pFPR, pStack, bOverflow );
117 - break;
118 + break;
119 case typelib_TypeClass_DOUBLE:
120 INSERT_DOUBLE( pCppArgs[nPos], nFPR, pFPR, pStack, bOverflow );
121 break;
122 + default:
123 + break;
124 }
125
126 // no longer needed
127 --
128 2.4.0
129

  ViewVC Help
Powered by ViewVC 1.1.30