[Libreoffice-commits] .: bridges/source

Jani Monoses janimo at kemper.freedesktop.org
Mon Feb 20 15:25:43 PST 2012


 bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx |    6 ++++++
 bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx |    3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit e13dc26e394ede799a60691638971cf1d9689f74
Author: Jani Monoses <jani at ubuntu.com>
Date:   Tue Feb 21 01:15:02 2012 +0200

    ARM bridge: fixes for passing double arguments on the stack

diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
index 07bdea1..9750b6a 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx
@@ -70,6 +70,7 @@ namespace
         char * pCppStack = pTopStack;
 
 #ifdef __ARM_PCS_VFP
+        int dc = 0;
         char * pFloatArgs = (char *)(pCppStack - 64);
 #endif
         // return
@@ -152,6 +153,11 @@ namespace
                     if ((pFloatArgs - pTopStack) % 8) pFloatArgs+=sizeof(float); //align to 8
                     pCppArgs[nPos] = pUnoArgs[nPos] = pFloatArgs;
                     pFloatArgs += sizeof(double);
+                    if (++dc == arm::MAX_FPR_REGS) {
+                        if (pCppStack - pTopStack < 16)
+                            pCppStack = pTopStack + 16;
+                        pFloatArgs = pCppStack;
+                    }
                 } else
 #endif
                     pCppArgs[nPos] = pUnoArgs[nPos] = pCppStack;
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
index 8e69ebe..98b29ba 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
@@ -362,7 +362,8 @@ void callVirtualMethod(
                 { \
                     ++pDS; \
                 } \
-                *pDS++ = *reinterpret_cast<double *>( pSV );\
+            *(double *)pDS = *reinterpret_cast<double *>( pSV );\
+            pDS += 2;\
         }
 #else
 #define INSERT_FLOAT( pSV, nr, pFPR, pDS ) \


More information about the Libreoffice-commits mailing list