[Libreoffice-commits] core.git: bridges/source
Caolán McNamara
caolanm at redhat.com
Fri Aug 22 07:09:23 PDT 2014
bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx | 8 +++++++
bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx | 17 +++++++++++++---
2 files changed, 22 insertions(+), 3 deletions(-)
New commits:
commit 6ab1951ea2e31f47bc9f211dd9b2681c794b8e7f
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Aug 22 15:06:53 2014 +0100
Resolves: rhbz#1125588 ppc64le passes testtools
*bzzt*, <lightning arcs, faint smell of ozone>, it's alive!
Change-Id: I0b42f4e2603e6d76200d63ab2e26bbb856ae1173
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
index dbdef1b..507d3b1 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
@@ -545,7 +545,11 @@ extern "C" void privateSnippetExecutor( ... )
"mr %0, 1\n\t"
: "=r" (sp) : );
+#if _CALL_ELF == 2
volatile long nRegReturn[1];
+#else
+ volatile long nRegReturn[2];
+#endif
typelib_TypeClass aType =
cpp_mediate( nOffsetAndIndex, (void**)gpreg, (void**)fpreg, sp, (sal_Int64*)nRegReturn);
@@ -588,6 +592,10 @@ extern "C" void privateSnippetExecutor( ... )
default:
__asm__( "ld 3,%0\n\t"
: : "m" (nRegReturn[0]) );
+#if _CALL_ELF == 2
+ __asm__( "ld 4,%0\n\t"
+ : : "m" (nRegReturn[1]) );
+#endif
break;
}
}
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
index aa054d7..391ef219 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
@@ -87,9 +87,9 @@ namespace ppc64
}
}
-void MapReturn(long r3, double dret, typelib_TypeClass eTypeClass, void *pRegisterReturn)
+void MapReturn(long r3, long r4, double dret, typelib_TypeDescriptionReference* pReturnType, void *pRegisterReturn)
{
- switch (eTypeClass)
+ switch (pReturnType->eTypeClass)
{
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
@@ -115,6 +115,17 @@ void MapReturn(long r3, double dret, typelib_TypeClass eTypeClass, void *pRegist
case typelib_TypeClass_DOUBLE:
*reinterpret_cast<double *>( pRegisterReturn ) = dret;
break;
+#if _CALL_ELF == 2
+ case typelib_TypeClass_STRUCT:
+ case typelib_TypeClass_EXCEPTION:
+ if (!ppc64::return_in_hidden_param(pReturnType))
+ {
+ sal_uInt64 *pRegisters = reinterpret_cast<sal_uInt64*>(pRegisterReturn);
+ pRegisters[0] = r3;
+ if (pReturnType->pType->nSize > 8)
+ pRegisters[1] = r4;
+ }
+#endif
default:
break;
}
@@ -222,7 +233,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
"fmr %0, 1\n\t"
: "=f" (dret), "=r" (r3), "=r" (r4) : );
- MapReturn(r3, dret, pReturnTypeDescr->eTypeClass, pRegisterReturn);
+ MapReturn(r3, r4, dret, pReturnTypeRef, pRegisterReturn);
}
// Macros for easier insertion of values to registers or stack
More information about the Libreoffice-commits
mailing list