You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
104 lines
3.8 KiB
104 lines
3.8 KiB
From af73a28e8538f5b2df6bbfd592d8987511520d4d Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
|
Date: Fri, 22 Aug 2014 21:08:47 +0100
|
|
Subject: [PATCH] if _CALL_ELF -> if defined(_CALL_ELF) && _CALL_ELF == 2
|
|
|
|
Change-Id: I34e9a98586b795a3fa31ae775aee7898b36e65d4
|
|
---
|
|
bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx | 10 +++++-----
|
|
bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx | 8 ++++----
|
|
2 files changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
|
|
index 35cc16f..430999f 100644
|
|
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
|
|
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx
|
|
@@ -326,7 +326,7 @@ static typelib_TypeClass cpp2uno_call(
|
|
}
|
|
}
|
|
|
|
-#if _CALL_ELF == 2
|
|
+#if defined(_CALL_ELF) && _CALL_ELF == 2
|
|
# define PARAMSAVE 32
|
|
#else
|
|
# define PARAMSAVE 48
|
|
@@ -545,7 +545,7 @@ extern "C" void privateSnippetExecutor( ... )
|
|
"mr %0, 1\n\t"
|
|
: "=r" (sp) : );
|
|
|
|
-#if _CALL_ELF == 2
|
|
+#if defined(_CALL_ELF) && _CALL_ELF == 2
|
|
volatile long nRegReturn[2];
|
|
#else
|
|
volatile long nRegReturn[1];
|
|
@@ -592,7 +592,7 @@ extern "C" void privateSnippetExecutor( ... )
|
|
default:
|
|
__asm__( "ld 3,%0\n\t"
|
|
: : "m" (nRegReturn[0]) );
|
|
-#if _CALL_ELF == 2
|
|
+#if defined(_CALL_ELF) && _CALL_ELF == 2
|
|
__asm__( "ld 4,%0\n\t"
|
|
: : "m" (nRegReturn[1]) );
|
|
#endif
|
|
@@ -600,7 +600,7 @@ extern "C" void privateSnippetExecutor( ... )
|
|
}
|
|
}
|
|
|
|
-#if _CALL_ELF == 2
|
|
+#if defined(_CALL_ELF) && _CALL_ELF == 2
|
|
const int codeSnippetSize = 32;
|
|
#else
|
|
const int codeSnippetSize = 24;
|
|
@@ -618,7 +618,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, sa
|
|
|
|
if ( bHasHiddenParam )
|
|
nOffsetAndIndex |= 0x80000000;
|
|
-#if _CALL_ELF == 2
|
|
+#if defined(_CALL_ELF) && _CALL_ELF == 2
|
|
unsigned int *raw = (unsigned int *)&code[0];
|
|
|
|
raw[0] = 0xe96c0018; /* 0: ld 11,2f-0b(12) */
|
|
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
|
|
index 391ef219..cfe720d 100644
|
|
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
|
|
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
|
|
@@ -39,7 +39,7 @@ using namespace ::com::sun::star::uno;
|
|
|
|
namespace ppc64
|
|
{
|
|
-#if _CALL_ELF == 2
|
|
+#if defined(_CALL_ELF) && _CALL_ELF == 2
|
|
bool is_complex_struct(const typelib_TypeDescription * type)
|
|
{
|
|
const typelib_CompoundTypeDescription * p
|
|
@@ -70,7 +70,7 @@ namespace ppc64
|
|
{
|
|
if (bridges::cpp_uno::shared::isSimpleType(pTypeRef))
|
|
return false;
|
|
-#if _CALL_ELF == 2
|
|
+#if defined(_CALL_ELF) && _CALL_ELF == 2
|
|
else if (pTypeRef->eTypeClass == typelib_TypeClass_STRUCT || pTypeRef->eTypeClass == typelib_TypeClass_EXCEPTION)
|
|
{
|
|
typelib_TypeDescription * pTypeDescr = 0;
|
|
@@ -115,7 +115,7 @@ void MapReturn(long r3, long r4, double dret, typelib_TypeDescriptionReference*
|
|
case typelib_TypeClass_DOUBLE:
|
|
*reinterpret_cast<double *>( pRegisterReturn ) = dret;
|
|
break;
|
|
-#if _CALL_ELF == 2
|
|
+#if defined(_CALL_ELF) && _CALL_ELF == 2
|
|
case typelib_TypeClass_STRUCT:
|
|
case typelib_TypeClass_EXCEPTION:
|
|
if (!ppc64::return_in_hidden_param(pReturnType))
|
|
@@ -175,7 +175,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
|
|
pMethod += 8 * nVtableIndex;
|
|
pMethod = *((sal_uInt64 *)pMethod);
|
|
|
|
-#if _CALL_ELF == 2
|
|
+#if defined(_CALL_ELF) && _CALL_ELF == 2
|
|
typedef void (* FunctionCall )(...);
|
|
#else
|
|
typedef void (* FunctionCall )( sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64 );
|
|
--
|
|
1.9.3
|
|
|