summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx24
1 files changed, 11 insertions, 13 deletions
diff --git a/bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx
index eacd01332900..07ec8501f0df 100644
--- a/bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx
@@ -77,7 +77,7 @@ namespace arm
}
}
-void MapReturn(sal_uInt64 x0, sal_uInt64 x1, typelib_TypeDescriptionReference *pReturnType, sal_uInt64 *pRegisterReturn)
+void MapReturn(sal_uInt64 x0, sal_uInt64 x1, double d0, typelib_TypeDescriptionReference *pReturnType, sal_uInt64 *pRegisterReturn)
{
switch( pReturnType->eTypeClass )
{
@@ -96,18 +96,10 @@ void MapReturn(sal_uInt64 x0, sal_uInt64 x1, typelib_TypeDescriptionReference *p
pRegisterReturn[0] = x0;
break;
case typelib_TypeClass_FLOAT:
- register float fret asm("s0");
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wuninitialized"
- *(float*)pRegisterReturn = fret;
-#pragma GCC diagnostic pop
+ *(float*)pRegisterReturn = *(float*)&d0;
break;
case typelib_TypeClass_DOUBLE:
- register double dret asm("d0");
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wuninitialized"
- *(double*)pRegisterReturn = dret;
-#pragma GCC diagnostic pop
+ *(double*)pRegisterReturn = d0;
break;
case typelib_TypeClass_STRUCT:
case typelib_TypeClass_EXCEPTION:
@@ -153,9 +145,11 @@ void callVirtualMethod(
// For value returned in registers
sal_uInt64 x0;
sal_uInt64 x1;
+ double d0;
__asm__ __volatile__
(
+ // Assembly string
" ldp x0, x1, %[pgpr_0]\n"
" ldp x2, x3, %[pgpr_2]\n"
" ldp x4, x5, %[pgpr_4]\n"
@@ -168,7 +162,10 @@ void callVirtualMethod(
" blr %[pmethod]\n"
" str x0, %[x0]\n"
" str x1, %[x1]\n"
- : [x0]"=m" (x0), [x1]"=m" (x1)
+ " str d0, %[d0]\n"
+ // Output operands
+ : [x0]"=m" (x0), [x1]"=m" (x1), [d0]"=m" (d0)
+ // Input operands
: [pgpr_0]"m" (pGPR[0]),
[pgpr_2]"m" (pGPR[2]),
[pgpr_4]"m" (pGPR[4]),
@@ -179,10 +176,11 @@ void callVirtualMethod(
[pfpr_4]"m" (pFPR[4]),
[pfpr_6]"m" (pFPR[6]),
[pmethod]"r" (pMethod)
+ // Clobbers
: "x0", "x1", "x2", "x3", "x4", "x5", "x6", "x7", "x8", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7"
);
- MapReturn(x0, x1, pReturnType, (sal_uInt64 *) pRegisterReturn);
+ MapReturn(x0, x1, d0, pReturnType, (sal_uInt64 *) pRegisterReturn);
}
}