summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorCaolan McNamara <caolanm@redhat.com>2015-07-10 16:00:22 +0100
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:56:09 +0200
commit53c50a16d10e1b6122f4933e6d7291fa69971872 (patch)
tree09f483436393af3b9384ab9de3302a34c983b4b3 /bridges
parent90db8ed0e4e8eb4e010815ec1a285a8b821a1ac7 (diff)
ppc64: simplify this a little
Change-Id: I8166f65625d389a604750852d6d5a4fee25a88fa Reviewed-on: https://gerrit.libreoffice.org/16935 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit fe14c55f000b9a31d885b411655232e0691e1cd4) Reviewed-on: https://gerrit.libreoffice.org/16945 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx61
1 files changed, 24 insertions, 37 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index 401307642bc6..81d3d5ca192c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -124,6 +124,8 @@ void MapReturn(long r3, long r4, double dret, typelib_TypeDescriptionReference*
if (pReturnType->pType->nSize > 8)
pRegisters[1] = r4;
}
+#else
+ (void)r4;
#endif
default:
break;
@@ -185,45 +187,29 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
// fill registers
__asm__ __volatile__ (
- "ld 3, 0(%0)\n\t"
- "ld 4, 8(%0)\n\t"
- "ld 5, 16(%0)\n\t"
- "ld 6, 24(%0)\n\t"
- "ld 7, 32(%0)\n\t"
- "ld 8, 40(%0)\n\t"
- "ld 9, 48(%0)\n\t"
- "ld 10, 56(%0)\n\t"
- "lfd 1, 0(%1)\n\t"
- "lfd 2, 8(%1)\n\t"
- "lfd 3, 16(%1)\n\t"
- "lfd 4, 24(%1)\n\t"
- "lfd 5, 32(%1)\n\t"
- "lfd 6, 40(%1)\n\t"
- "lfd 7, 48(%1)\n\t"
- "lfd 8, 56(%1)\n\t"
- "lfd 9, 64(%1)\n\t"
- "lfd 10, 72(%1)\n\t"
- "lfd 11, 80(%1)\n\t"
- "lfd 12, 88(%1)\n\t"
- "lfd 13, 96(%1)\n\t"
- : : "r" (pGPR), "r" (pFPR)
- : "r0", "r3", "r4", "r5", "r6", "r7", "r8", "r9", "r10",
- "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", "fr8", "fr9",
- "fr10", "fr11", "fr12", "fr13"
+ "lfd 1, 0(%0)\n\t"
+ "lfd 2, 8(%0)\n\t"
+ "lfd 3, 16(%0)\n\t"
+ "lfd 4, 24(%0)\n\t"
+ "lfd 5, 32(%0)\n\t"
+ "lfd 6, 40(%0)\n\t"
+ "lfd 7, 48(%0)\n\t"
+ "lfd 8, 56(%0)\n\t"
+ "lfd 9, 64(%0)\n\t"
+ "lfd 10, 72(%0)\n\t"
+ "lfd 11, 80(%0)\n\t"
+ "lfd 12, 88(%0)\n\t"
+ "lfd 13, 96(%0)\n\t"
+ : : "r" (pFPR)
+ : "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7", "fr8", "fr9",
+ "fr10", "fr11", "fr12", "fr13"
);
// tell gcc that r3 to r11 are not available to it for doing the TOC and exception munge on the func call
register sal_uInt64 r3 asm("r3");
register sal_uInt64 r4 asm("r4");
- register sal_uInt64 r5 asm("r5");
- register sal_uInt64 r6 asm("r6");
- register sal_uInt64 r7 asm("r7");
- register sal_uInt64 r8 asm("r8");
- register sal_uInt64 r9 asm("r9");
- register sal_uInt64 r10 asm("r10");
- register sal_uInt64 r11 asm("r11");
- (*pFunc)(r3, r4, r5, r6, r7, r8, r9, r10);
+ (*pFunc)(pGPR[0], pGPR[1], pGPR[2], pGPR[3], pGPR[4], pGPR[5], pGPR[6], pGPR[7]);
// get return value
__asm__ __volatile__ (
@@ -375,7 +361,6 @@ static void cpp_call(
if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
{
-// uno_copyAndConvertData( pCppArgs[nPos] = alloca( 8 ), pUnoArgs[nPos], pParamTypeDescr,
uno_copyAndConvertData( pCppArgs[nPos] = pStack, pUnoArgs[nPos], pParamTypeDescr,
pThis->getBridge()->getUno2Cpp() );
switch (pParamTypeDescr->eTypeClass)
@@ -383,7 +368,7 @@ static void cpp_call(
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
#if OSL_DEBUG_LEVEL > 2
- fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]);
+ fprintf(stderr, "hyper is %lx\n", pCppArgs[nPos]);
#endif
INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow );
break;
@@ -391,7 +376,7 @@ static void cpp_call(
case typelib_TypeClass_UNSIGNED_LONG:
case typelib_TypeClass_ENUM:
#if OSL_DEBUG_LEVEL > 2
- fprintf(stderr, "long is %x\n", pCppArgs[nPos]);
+ fprintf(stderr, "long is %x\n", pCppArgs[nPos]);
#endif
INSERT_INT32( pCppArgs[nPos], nGPR, pGPR, pStack, bOverflow );
break;
@@ -406,10 +391,12 @@ static void cpp_call(
break;
case typelib_TypeClass_FLOAT:
INSERT_FLOAT( pCppArgs[nPos], nFPR, pFPR, pStack, bOverflow );
- break;
+ break;
case typelib_TypeClass_DOUBLE:
INSERT_DOUBLE( pCppArgs[nPos], nFPR, pFPR, pStack, bOverflow );
break;
+ default:
+ break;
}
// no longer needed