if _CALL_ELF -> if defined(_CALL_ELF) && _CALL_ELF == 2

Change-Id: I34e9a98586b795a3fa31ae775aee7898b36e65d4
This commit is contained in:
Caolán McNamara
2014-08-22 21:08:47 +01:00
parent 234fba5b45
commit af73a28e85
2 changed files with 9 additions and 9 deletions

View File

@@ -326,7 +326,7 @@ static typelib_TypeClass cpp2uno_call(
} }
} }
#if _CALL_ELF == 2 #if defined(_CALL_ELF) && _CALL_ELF == 2
# define PARAMSAVE 32 # define PARAMSAVE 32
#else #else
# define PARAMSAVE 48 # define PARAMSAVE 48
@@ -545,7 +545,7 @@ extern "C" void privateSnippetExecutor( ... )
"mr %0, 1\n\t" "mr %0, 1\n\t"
: "=r" (sp) : ); : "=r" (sp) : );
#if _CALL_ELF == 2 #if defined(_CALL_ELF) && _CALL_ELF == 2
volatile long nRegReturn[2]; volatile long nRegReturn[2];
#else #else
volatile long nRegReturn[1]; volatile long nRegReturn[1];
@@ -592,7 +592,7 @@ extern "C" void privateSnippetExecutor( ... )
default: default:
__asm__( "ld 3,%0\n\t" __asm__( "ld 3,%0\n\t"
: : "m" (nRegReturn[0]) ); : : "m" (nRegReturn[0]) );
#if _CALL_ELF == 2 #if defined(_CALL_ELF) && _CALL_ELF == 2
__asm__( "ld 4,%0\n\t" __asm__( "ld 4,%0\n\t"
: : "m" (nRegReturn[1]) ); : : "m" (nRegReturn[1]) );
#endif #endif
@@ -600,7 +600,7 @@ extern "C" void privateSnippetExecutor( ... )
} }
} }
#if _CALL_ELF == 2 #if defined(_CALL_ELF) && _CALL_ELF == 2
const int codeSnippetSize = 32; const int codeSnippetSize = 32;
#else #else
const int codeSnippetSize = 24; const int codeSnippetSize = 24;
@@ -618,7 +618,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 nFunctionIndex, sa
if ( bHasHiddenParam ) if ( bHasHiddenParam )
nOffsetAndIndex |= 0x80000000; nOffsetAndIndex |= 0x80000000;
#if _CALL_ELF == 2 #if defined(_CALL_ELF) && _CALL_ELF == 2
unsigned int *raw = (unsigned int *)&code[0]; unsigned int *raw = (unsigned int *)&code[0];
raw[0] = 0xe96c0018; /* 0: ld 11,2f-0b(12) */ raw[0] = 0xe96c0018; /* 0: ld 11,2f-0b(12) */

View File

@@ -39,7 +39,7 @@ using namespace ::com::sun::star::uno;
namespace ppc64 namespace ppc64
{ {
#if _CALL_ELF == 2 #if defined(_CALL_ELF) && _CALL_ELF == 2
bool is_complex_struct(const typelib_TypeDescription * type) bool is_complex_struct(const typelib_TypeDescription * type)
{ {
const typelib_CompoundTypeDescription * p const typelib_CompoundTypeDescription * p
@@ -70,7 +70,7 @@ namespace ppc64
{ {
if (bridges::cpp_uno::shared::isSimpleType(pTypeRef)) if (bridges::cpp_uno::shared::isSimpleType(pTypeRef))
return false; 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) else if (pTypeRef->eTypeClass == typelib_TypeClass_STRUCT || pTypeRef->eTypeClass == typelib_TypeClass_EXCEPTION)
{ {
typelib_TypeDescription * pTypeDescr = 0; typelib_TypeDescription * pTypeDescr = 0;
@@ -115,7 +115,7 @@ void MapReturn(long r3, long r4, double dret, typelib_TypeDescriptionReference*
case typelib_TypeClass_DOUBLE: case typelib_TypeClass_DOUBLE:
*reinterpret_cast<double *>( pRegisterReturn ) = dret; *reinterpret_cast<double *>( pRegisterReturn ) = dret;
break; break;
#if _CALL_ELF == 2 #if defined(_CALL_ELF) && _CALL_ELF == 2
case typelib_TypeClass_STRUCT: case typelib_TypeClass_STRUCT:
case typelib_TypeClass_EXCEPTION: case typelib_TypeClass_EXCEPTION:
if (!ppc64::return_in_hidden_param(pReturnType)) if (!ppc64::return_in_hidden_param(pReturnType))
@@ -175,7 +175,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
pMethod += 8 * nVtableIndex; pMethod += 8 * nVtableIndex;
pMethod = *((sal_uInt64 *)pMethod); pMethod = *((sal_uInt64 *)pMethod);
#if _CALL_ELF == 2 #if defined(_CALL_ELF) && _CALL_ELF == 2
typedef void (* FunctionCall )(...); typedef void (* FunctionCall )(...);
#else #else
typedef void (* FunctionCall )( sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64 ); typedef void (* FunctionCall )( sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64, sal_uInt64 );