1 |
From af73a28e8538f5b2df6bbfd592d8987511520d4d Mon Sep 17 00:00:00 2001 |
2 |
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com> |
3 |
Date: Fri, 22 Aug 2014 21:08:47 +0100 |
4 |
Subject: [PATCH] if _CALL_ELF -> if defined(_CALL_ELF) && _CALL_ELF == 2 |
5 |
|
6 |
Change-Id: I34e9a98586b795a3fa31ae775aee7898b36e65d4 |
7 |
--- |
8 |
bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx | 10 +++++----- |
9 |
bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx | 8 ++++---- |
10 |
2 files changed, 9 insertions(+), 9 deletions(-) |
11 |
|
12 |
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |
13 |
index 35cc16f..430999f 100644 |
14 |
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |
15 |
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx |
16 |
@@ -326,7 +326,7 @@ static typelib_TypeClass cpp2uno_call( |
17 |
} |
18 |
} |
19 |
|
20 |
-#if _CALL_ELF == 2 |
21 |
+#if defined(_CALL_ELF) && _CALL_ELF == 2 |
22 |
# define PARAMSAVE 32 |
23 |
#else |
24 |
# define PARAMSAVE 48 |
25 |
@@ -545,7 +545,7 @@ extern "C" void privateSnippetExecutor( ... ) |
26 |
"mr %0, 1\n\t" |
27 |
: "=r" (sp) : ); |
28 |
|
29 |
-#if _CALL_ELF == 2 |
30 |
+#if defined(_CALL_ELF) && _CALL_ELF == 2 |
31 |
volatile long nRegReturn[2]; |
32 |
#else |
33 |
volatile long nRegReturn[1]; |
34 |
@@ -592,7 +592,7 @@ extern "C" void privateSnippetExecutor( ... ) |
35 |
default: |
36 |
__asm__( "ld 3,%0\n\t" |
37 |
: : "m" (nRegReturn[0]) ); |
38 |
-#if _CALL_ELF == 2 |
39 |
+#if defined(_CALL_ELF) && _CALL_ELF == 2 |
40 |
__asm__( "ld 4,%0\n\t" |
41 |
: : "m" (nRegReturn[1]) ); |
42 |
#endif |
43 |
@@ -600,7 +600,7 @@ extern "C" void privateSnippetExecutor( ... ) |
44 |
} |
45 |
} |
46 |
|
47 |
-#if _CALL_ELF == 2 |
48 |
+#if defined(_CALL_ELF) && _CALL_ELF == 2 |
49 |
const int codeSnippetSize = 32; |
50 |
#else |
51 |
const int codeSnippetSize = 24; |
52 |
@@ -618,7 +618,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, sa |
53 |
|
54 |
if ( bHasHiddenParam ) |
55 |
nOffsetAndIndex |= 0x80000000; |
56 |
-#if _CALL_ELF == 2 |
57 |
+#if defined(_CALL_ELF) && _CALL_ELF == 2 |
58 |
unsigned int *raw = (unsigned int *)&code[0]; |
59 |
|
60 |
raw[0] = 0xe96c0018; /* 0: ld 11,2f-0b(12) */ |
61 |
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |
62 |
index 391ef219..cfe720d 100644 |
63 |
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |
64 |
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |
65 |
@@ -39,7 +39,7 @@ using namespace ::com::sun::star::uno; |
66 |
|
67 |
namespace ppc64 |
68 |
{ |
69 |
-#if _CALL_ELF == 2 |
70 |
+#if defined(_CALL_ELF) && _CALL_ELF == 2 |
71 |
bool is_complex_struct(const typelib_TypeDescription * type) |
72 |
{ |
73 |
const typelib_CompoundTypeDescription * p |
74 |
@@ -70,7 +70,7 @@ namespace ppc64 |
75 |
{ |
76 |
if (bridges::cpp_uno::shared::isSimpleType(pTypeRef)) |
77 |
return false; |
78 |
-#if _CALL_ELF == 2 |
79 |
+#if defined(_CALL_ELF) && _CALL_ELF == 2 |
80 |
else if (pTypeRef->eTypeClass == typelib_TypeClass_STRUCT || pTypeRef->eTypeClass == typelib_TypeClass_EXCEPTION) |
81 |
{ |
82 |
typelib_TypeDescription * pTypeDescr = 0; |
83 |
@@ -115,7 +115,7 @@ void MapReturn(long r3, long r4, double dret, typelib_TypeDescriptionReference* |
84 |
case typelib_TypeClass_DOUBLE: |
85 |
*reinterpret_cast<double *>( pRegisterReturn ) = dret; |
86 |
break; |
87 |
-#if _CALL_ELF == 2 |
88 |
+#if defined(_CALL_ELF) && _CALL_ELF == 2 |
89 |
case typelib_TypeClass_STRUCT: |
90 |
case typelib_TypeClass_EXCEPTION: |
91 |
if (!ppc64::return_in_hidden_param(pReturnType)) |
92 |
@@ -175,7 +175,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex, |
93 |
pMethod += 8 * nVtableIndex; |
94 |
pMethod = *((sal_uInt64 *)pMethod); |
95 |
|
96 |
-#if _CALL_ELF == 2 |
97 |
+#if defined(_CALL_ELF) && _CALL_ELF == 2 |
98 |
typedef void (* FunctionCall )(...); |
99 |
#else |
100 |
typedef void (* FunctionCall )( sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64 ); |
101 |
-- |
102 |
1.9.3 |
103 |
|