[ooo-build-commit] .: patches/dev300

René Engelhard rene at kemper.freedesktop.org
Fri May 7 06:50:14 PDT 2010


 patches/dev300/fix-arm-eabi-bridge.diff |  238 --------------------------------
 1 file changed, 238 deletions(-)

New commits:
commit 85554dd655098b1bb485ff42ba0c5c779dfb085b
Author: Rene Engelhard <rene at debian.org>
Date:   Fri May 7 15:48:07 2010 +0200

    remove broken .orig hunk
    
    * patches/dev300/fix-arm-eabi-bridge.diff:

diff --git a/patches/dev300/fix-arm-eabi-bridge.diff b/patches/dev300/fix-arm-eabi-bridge.diff
index 11f5203..2310181 100644
--- a/patches/dev300/fix-arm-eabi-bridge.diff
+++ b/patches/dev300/fix-arm-eabi-bridge.diff
@@ -462,241 +462,3 @@ diff -r bdd775934f7f -r 36887d11c60f bridges/source/cpp_uno/gcc3_linux_arm/uno2c
  
          VtableSlot aVtableSlot(
              getVtableSlot(
-diff -urN bridges-old/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx.orig bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx.orig
---- bridges-old/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx.orig	2010-05-04 18:35:23.000000000 +0200
-+++ bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx.orig	2010-05-04 18:40:56.000000000 +0200
-@@ -42,7 +42,17 @@
- #include <stdio.h>
- #include <string.h>
- 
--#if defined(__ARM_EABI__) && !defined(__SOFTFP__)
-+/* 
-+ * Based on http://gcc.gnu.org/PR41443
-+ * References to __SOFTFP__ are incorrect for EABI; the __SOFTFP__ code
-+ * should be used for *soft-float ABI* whether or not VFP is enabled,
-+ * and __SOFTFP__ does specifically mean soft-float not soft-float ABI.
-+ *
-+ * Changing the conditionals to __SOFTFP__ || __ARM_EABI__ then 
-+ * -mfloat-abi=softfp should work.  -mfloat-abi=hard won't; that would
-+ * need both a new macro to identify the hard-VFP ABI.
-+ */
-+#if !defined(__ARM_EABI__) && !defined(__SOFTFP__)
- #error Not Implemented
- 
- /*
-@@ -95,17 +105,58 @@
- 
- namespace arm
- {
--    enum armlimits { MAX_GPR_REGS = 4 };
-+    bool is_complex_struct(const typelib_TypeDescription * type)
-+    {
-+        const typelib_CompoundTypeDescription * p
-+            = reinterpret_cast< const typelib_CompoundTypeDescription * >(type);
-+        for (sal_Int32 i = 0; i < p->nMembers; ++i)
-+        {
-+            if (p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_STRUCT ||
-+                p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_EXCEPTION)
-+            {
-+                typelib_TypeDescription * t = 0;
-+                TYPELIB_DANGER_GET(&t, p->ppTypeRefs[i]);
-+                bool b = is_complex_struct(t);
-+                TYPELIB_DANGER_RELEASE(t);
-+                if (b) {
-+                    return true;
-+                }
-+            }
-+            else if (!bridges::cpp_uno::shared::isSimpleType(p->ppTypeRefs[i]->eTypeClass))
-+                return true;
-+        }
-+        if (p->pBaseTypeDescription != 0)
-+            return is_complex_struct(&p->pBaseTypeDescription->aBase);
-+        return false;
-+    }
-+
-+    bool return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef )
-+    {
-+        if (bridges::cpp_uno::shared::isSimpleType(pTypeRef))
-+            return false;
-+        else if (pTypeRef->eTypeClass == typelib_TypeClass_STRUCT || pTypeRef->eTypeClass == typelib_TypeClass_EXCEPTION)
-+        {
-+            typelib_TypeDescription * pTypeDescr = 0;
-+            TYPELIB_DANGER_GET( &pTypeDescr, pTypeRef );
-+
-+            //A Composite Type not larger than 4 bytes is returned in r0
-+            bool bRet = pTypeDescr->nSize > 4 || is_complex_struct(pTypeDescr);
-+
-+            TYPELIB_DANGER_RELEASE( pTypeDescr );
-+            return bRet;
-+        }
-+        return true;
-+    }
- }
- 
--void MapReturn(long r0, long r1, typelib_TypeClass eReturnType, void *pRegisterReturn)
-+void MapReturn(long r0, long r1, typelib_TypeDescriptionReference * pReturnType, void *pRegisterReturn)
- {
--#ifndef __SOFTFP__
-+#if !defined(__ARM_EABI__) && !defined(__SOFTFP__)
-     register float fret asm("f0");
-     register double dret asm("f0");
- #endif
- 
--    switch( eReturnType )
-+    switch( pReturnType->eTypeClass )
-     {
-         case typelib_TypeClass_HYPER:
-         case typelib_TypeClass_UNSIGNED_HYPER:
-@@ -125,20 +176,27 @@
-             *(unsigned char*)pRegisterReturn = (unsigned char)r0;
-             break;
-         case typelib_TypeClass_FLOAT:
--#ifdef __SOFTFP__
-+#if defined(__ARM_EABI__) || defined(__SOFTFP__)
-             ((long*)pRegisterReturn)[0] = r0;
- #else
-             *(float*)pRegisterReturn = fret;
- #endif
-         break;
-         case typelib_TypeClass_DOUBLE:
--#ifdef __SOFTFP__
-+#if defined(__ARM_EABI__) || defined(__SOFTFP__)
-             ((long*)pRegisterReturn)[1] = r1;
-             ((long*)pRegisterReturn)[0] = r0;
- #else
-             *(double*)pRegisterReturn = dret;
- #endif
-             break;
-+        case typelib_TypeClass_STRUCT:
-+        case typelib_TypeClass_EXCEPTION:
-+        {
-+            if (!arm::return_in_hidden_param(pReturnType))
-+                ((long*)pRegisterReturn)[0] = r0;
-+            break;
-+        }
-         default:
-             break;
-     }
-@@ -152,7 +210,7 @@
-     void * pThis,
-     sal_Int32 nVtableIndex,
-     void * pRegisterReturn,
--    typelib_TypeClass eReturnType,
-+    typelib_TypeDescriptionReference * pReturnType,
-     sal_uInt32 *pStack,
-     sal_uInt32 nStack,
-     sal_uInt32 *pGPR,
-@@ -162,7 +220,7 @@
-     void * pThis,
-     sal_Int32 nVtableIndex,
-     void * pRegisterReturn,
--    typelib_TypeClass eReturnType,
-+    typelib_TypeDescriptionReference * pReturnType,
-     sal_uInt32 *pStack,
-     sal_uInt32 nStack,
-     sal_uInt32 *pGPR,
-@@ -191,23 +249,10 @@
-     typedef void (*FunctionCall )( sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32);
-     FunctionCall pFunc = (FunctionCall)pMethod;
- 
--    // fill registers
--    __asm__ __volatile__ (
--        "ldr r0, [%0, #0]\n\t"
--        "ldr r1, [%0, #4]\n\t"
--        "ldr r2, [%0, #8]\n\t"
--        "ldr r3, [%0, #12]\n\t"
--        : : "r" (pGPR)
--        : "r0", "r1", "r2", "r3"
--    );
--
--    // tell gcc that r0 to r3 are not available to it
--    register sal_uInt32 r0 asm("r0");
--    register sal_uInt32 r1 asm("r1");
--    register sal_uInt32 r2 asm("r2");
--    register sal_uInt32 r3 asm("r3");
-+    (*pFunc)(pGPR[0], pGPR[1], pGPR[2], pGPR[3]);
- 
--    (*pFunc)(r0, r1, r2, r3);
-+    sal_uInt32 r0;
-+    sal_uInt32 r1;
- 
-     // get return value
-     __asm__ __volatile__ (
-@@ -215,7 +260,7 @@
-         "mov %1, r1\n\t"
-         : "=r" (r0), "=r" (r1) : );
- 
--    MapReturn(r0, r1, eReturnType, pRegisterReturn);
-+    MapReturn(r0, r1, pReturnType, pRegisterReturn);
- }
- }
- 
-@@ -302,14 +347,14 @@
-     void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
- 
-     bool bOverFlow = false;
--    
-+    bool bSimpleReturn = true;
-     if (pReturnTypeDescr)
-     {
-+        if (arm::return_in_hidden_param( pReturnTypeRef ) )
-+            bSimpleReturn = false;
- 
--        if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
--        {
-+        if (bSimpleReturn)
-             pCppReturn = pUnoReturn; // direct way for simple types
--        }
-         else
-         {
-             // complex return via ptr
-@@ -380,6 +425,8 @@
-             case typelib_TypeClass_DOUBLE:
-                 INSERT_DOUBLE( pCppArgs[nPos], nGPR, pGPR, pStack, pStackStart, bOverFlow );
-                 break;
-+            default:
-+                break;
-             }
-             // no longer needed
-             TYPELIB_DANGER_RELEASE( pParamTypeDescr );
-@@ -421,7 +468,7 @@
-     {
-         callVirtualMethod(
-             pAdjustedThisPtr, aVtableSlot.index,
--            pCppReturn, pReturnTypeDescr->eTypeClass,
-+            pCppReturn, pReturnTypeRef,
-             pStackStart, 
-             (pStack - pStackStart),
-             pGPR, nGPR);
-@@ -494,15 +541,19 @@
-     // is my surrogate
-     bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
-           = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
-+#if OSL_DEBUG_LEVEL > 0
-     typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
-+#endif
-     
-     switch (pMemberDescr->eTypeClass)
-     {
-     case typelib_TypeClass_INTERFACE_ATTRIBUTE:
-     {
-+#if OSL_DEBUG_LEVEL > 0
-         // determine vtable call index
-         sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
-         OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
-+#endif
-         
-         VtableSlot aVtableSlot(
-             getVtableSlot(
-@@ -547,9 +598,11 @@
-     }
-     case typelib_TypeClass_INTERFACE_METHOD:
-     {
-+#if OSL_DEBUG_LEVEL > 0
-         // determine vtable call index
-         sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
-         OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
-+#endif
- 
-         VtableSlot aVtableSlot(
-             getVtableSlot(


More information about the ooo-build-commit mailing list