summaryrefslogtreecommitdiff
path: root/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx')
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx38
1 files changed, 9 insertions, 29 deletions
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
index 5fb2bd7e12a3..fc5a9af1ac5c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -121,13 +121,14 @@ static typelib_TypeClass cpp2uno_call(
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
int nUsedGPR = 0;
int nUsedSSE = 0;
- bool bFitsRegisters = x86_64::examine_argument( rParam.pTypeRef, false, nUsedGPR, nUsedSSE );
- if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ) ) // value
+#if OSL_DEBUG_LEVEL > 0
+ bool bFitsRegisters =
+#endif
+ x86_64::examine_argument( rParam.pTypeRef, false, nUsedGPR, nUsedSSE );
+ if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( rParam.pTypeRef ) ) // value
{
// Simple types must fit exactly one register on x86_64
OSL_ASSERT( bFitsRegisters && ( ( nUsedSSE == 1 && nUsedGPR == 0 ) || ( nUsedSSE == 0 && nUsedGPR == 1 ) ) );
@@ -152,35 +153,14 @@ static typelib_TypeClass cpp2uno_call(
else
pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw++;
}
-
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
else // struct <= 16 bytes || ptr to complex value || ref
{
- void *pCppStack;
- char pTmpStruct[16];
-
- if ( bFitsRegisters && !rParam.bOut &&
- ( pParamTypeDescr->eTypeClass == typelib_TypeClass_STRUCT ||
- pParamTypeDescr->eTypeClass == typelib_TypeClass_EXCEPTION ) )
- {
- if ( ( nr_gpr + nUsedGPR <= x86_64::MAX_GPR_REGS ) && ( nr_fpr + nUsedSSE <= x86_64::MAX_SSE_REGS ) )
- {
- x86_64::fill_struct( rParam.pTypeRef, gpreg, fpreg, pTmpStruct );
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "nUsedGPR == %d, nUsedSSE == %d, pTmpStruct[0] == 0x%x, pTmpStruct[1] == 0x%x, **gpreg == 0x%lx\n",
- nUsedGPR, nUsedSSE, pTmpStruct[0], pTmpStruct[1], *(sal_uInt64*)*gpreg );
-#endif
+ typelib_TypeDescription * pParamTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
- pCppArgs[nPos] = pCppStack = reinterpret_cast<void *>( pTmpStruct );
- gpreg += nUsedGPR;
- fpreg += nUsedSSE;
- }
- else
- pCppArgs[nPos] = pCppStack = *ovrflw++;
- }
- else if ( nr_gpr < x86_64::MAX_GPR_REGS )
+ void *pCppStack;
+ if ( nr_gpr < x86_64::MAX_GPR_REGS )
{
pCppArgs[nPos] = pCppStack = *gpreg++;
nr_gpr++;