diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-21 08:52:16 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-21 08:54:16 +0100 |
commit | 170109708e6a082252efba3d2f1726bbd82b6452 (patch) | |
tree | 8c2cee4f18116c85504aa0e0b09637e56a683357 /bridges | |
parent | b3698a6ac2642777ef0c25688e5dd5acde9594ba (diff) |
Related: rhbz#1125588 first steps for ppc64le
almost certainly won't get us too far, but a start
Change-Id: Ic20b97a97b6d506c32322173bd8332d15c3a4555
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx index a4a08c5bf303..11905078f52e 100644 --- a/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx +++ b/bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx @@ -31,6 +31,11 @@ #include <stdio.h> #include <string.h> +#ifdef OSL_BIGENDIAN +#define IS_BIG_ENDIAN 1 +#else +#define IS_BIG_ENDIAN 0 +#endif using namespace ::com::sun::star::uno; @@ -139,13 +144,13 @@ static typelib_TypeClass cpp2uno_call( case typelib_TypeClass_BOOLEAN: if (ng < ppc64::MAX_GPR_REGS) { - pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)gpreg) + (sizeof(void*)-1)); + pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)gpreg) + 7*IS_BIG_ENDIAN); ng++; gpreg++; } else { - pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + (sizeof(void*)-1)); + pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + 7*IS_BIG_ENDIAN); bOverflowUsed = true; } if (bOverflowUsed) ovrflw++; @@ -155,13 +160,13 @@ static typelib_TypeClass cpp2uno_call( case typelib_TypeClass_UNSIGNED_SHORT: if (ng < ppc64::MAX_GPR_REGS) { - pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)gpreg) + (sizeof(void*)-2)); + pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)gpreg) + 6*IS_BIG_ENDIAN); ng++; gpreg++; } else { - pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + (sizeof(void*)-2)); + pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + 6*IS_BIG_ENDIAN); bOverflowUsed = true; } if (bOverflowUsed) ovrflw++; @@ -171,13 +176,13 @@ static typelib_TypeClass cpp2uno_call( case typelib_TypeClass_UNSIGNED_LONG: if (ng < ppc64::MAX_GPR_REGS) { - pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)gpreg) + (sizeof(void*)-4)); + pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)gpreg) + 4*IS_BIG_ENDIAN); ng++; gpreg++; } else { - pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + (sizeof(void*)-4)); + pCppArgs[nPos] = pUnoArgs[nPos] = (((char *)ovrflw) + 4*IS_BIG_ENDIAN); bOverflowUsed = true; } if (bOverflowUsed) ovrflw++; |