rpms/openoffice.org/devel openoffice.org-2.1.0.ooo71815.bridges.x86_64.patch, NONE, 1.1 openoffice.org.spec, 1.943, 1.944

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Nov 21 13:16:09 UTC 2006


Author: caolanm

Update of /cvs/dist/rpms/openoffice.org/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv12221

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-2.1.0.ooo71815.bridges.x86_64.patch 
Log Message:
openoffice.org-2.1.0.ooo71815.bridges.x86_64.patch

openoffice.org-2.1.0.ooo71815.bridges.x86_64.patch:
 bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx |   30 ++++++++++++-------
 source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx         |    0 
 2 files changed, 20 insertions(+), 10 deletions(-)

--- NEW FILE openoffice.org-2.1.0.ooo71815.bridges.x86_64.patch ---
Index: source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
===================================================================
RCS file: /cvs/udk/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx,v
retrieving revision 1.6
diff -u -r1.6 uno2cpp.cxx
--- openoffice.org.orig/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx	16 Sep 2006 15:50:53 -0000	1.6
+++ openoffice.org/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx	21 Nov 2006 13:02:25 -0000
@@ -49,6 +49,7 @@
 #include "bridges/cpp_uno/shared/unointerfaceproxy.hxx"
 #include "bridges/cpp_uno/shared/vtables.hxx"
 
+#include "abi.hxx"
 #include "share.hxx"
 
 using namespace ::rtl;
@@ -165,7 +166,7 @@
 
 //==================================================================================================
 static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
-							  void * pRegisterReturn, typelib_TypeClass eReturnType,
+							  void * pRegisterReturn, typelib_TypeDescription * pReturnTypeDescr, bool bSimpleReturn,
 							  char * pPT, sal_uInt64 * pStackLongs, sal_uInt32 nStackLongs)
 {
 	sal_uInt32 nr_gpr, nr_fpr, nr_stack;
@@ -175,8 +176,6 @@
 	if (nr_stack)
 		nr_stack = (nr_stack + 1) & ~1;
 	
-	bool bReturnsSimpleType = bridges::cpp_uno::shared::isSimpleType( eReturnType );
-
 #if OSL_DEBUG_LEVEL > 1
 	// Let's figure out what is really going on here
 	fprintf(stderr,"callVirtualMethod() parameters string is %s\n", pPT);
@@ -244,7 +243,7 @@
 #undef ARG_GPR
     }
 
-	if ( bReturnsSimpleType )
+	if ( bSimpleReturn )
 		a0 = (sal_uInt64) pThis;
 	else
 		a1 = (sal_uInt64) pThis;
@@ -275,7 +274,7 @@
 	// Perform the call
 	ReturnValue aRet = ( ( FunctionCall ) pMethod )( a0, a1, a2, a3, a4, a5 );
 
-	switch (eReturnType)
+	switch (pReturnTypeDescr->eTypeClass)
 	{
 	case typelib_TypeClass_HYPER:
 	case typelib_TypeClass_UNSIGNED_HYPER:
@@ -301,6 +300,15 @@
 	case typelib_TypeClass_DOUBLE:
 		*reinterpret_cast<double *>( pRegisterReturn ) = *reinterpret_cast<double*>( &aRet.f.xmm0 );
 		break;
+    default: {
+        sal_Int32 const nRetSize = pReturnTypeDescr->nSize;
+        if (bSimpleReturn && nRetSize <= 16 && nRetSize > 0) {
+            if (nRetSize > 8)
+                static_cast<sal_uInt64 *>(pRegisterReturn)[1] = aRet.i.rdx;
+            static_cast<sal_uInt64 *>(pRegisterReturn)[0] = aRet.i.rax;
+        }
+        break;
+    }
 	}
 }
 
@@ -327,13 +335,15 @@
 	OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
 	
 	void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
-	
+
+	bool bSimpleReturn = true;	
 	if (pReturnTypeDescr)
 	{
-		if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
-		{
+		if ( x86_64::return_in_hidden_param( pReturnTypeRef ) )
+			bSimpleReturn = false;
+
+		if (bSimpleReturn)
 			pCppReturn = pUnoReturn; // direct way for simple types
-		}
 		else
 		{
 			// complex return via ptr
@@ -458,7 +468,7 @@
 		OSL_ENSURE( !( (pCppStack - pCppStackStart ) & 7), "UNALIGNED STACK !!! (Please DO panic)" );
 		callVirtualMethod(
 			pAdjustedThisPtr, aVtableSlot.index,
-			pCppReturn, pReturnTypeDescr->eTypeClass, pParamType,
+			pCppReturn, pReturnTypeDescr, bSimpleReturn, pParamType,
 			(sal_uInt64 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_uInt64) );
 		// NO exception occured...
 		*ppUnoExc = 0;


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/dist/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.943
retrieving revision 1.944
diff -u -r1.943 -r1.944
--- openoffice.org.spec	20 Nov 2006 15:30:24 -0000	1.943
+++ openoffice.org.spec	21 Nov 2006 13:16:07 -0000	1.944
@@ -130,6 +130,7 @@
 Patch64: openoffice.org-2.0.4.ooo71570.psprint.noonecopy.patch
 Patch65: openoffice.org-2.0.3.rh127576.gtkunixprintdialog.localize
 Patch66: openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch
+Patch67: openoffice.org-2.1.0.ooo71815.bridges.x86_64.patch
 
 %define instdir %{_libdir}/openoffice.org2.1
 
@@ -996,6 +997,7 @@
 %patch64 -p1 -b .ooo71570.psprint.noonecopy.patch
 cat %{PATCH65} >> svtools/source/dialogs/localize.sdf
 %patch66 -p1 -R -b .ooo71662.dbaccess.noasync.patch
+%patch67 -p1 -b .ooo71815.bridges.x86_64.patch
 
 tar xzf %{SOURCE1}
 
@@ -2519,6 +2521,9 @@
 %{instdir}/share/registry/modules/org/openoffice/Office/Scripting/Scripting-python.xcu
 
 %changelog
+* Tue Nov 21 2006 Caolan McNamara <caolanm at redhat.com> - 1:2.1.0-4.2
+- Resolves: rhbz#216347 openoffice.org-2.1.0.ooo71815.bridges.x86_64.patch
+
 * Thu Nov 15 2006 Caolan McNamara <caolanm at redhat.com> - 1:2.1.0-4.1
 - Resolves: rhbz#215511 can't print brochure on landscape mode
 - Resolves: rhbz#216089 zoom affecting cjk substitution




More information about the fedora-cvs-commits mailing list