Kaydet (Commit) b1787f20 authored tarafından Noel Power's avatar Noel Power
...@@ -31,6 +31,7 @@ br bridges\source\cpp_uno\cc50_solaris_intel nmake - u br_cc50soli br_unotypes ...@@ -31,6 +31,7 @@ br bridges\source\cpp_uno\cc50_solaris_intel nmake - u br_cc50soli br_unotypes
br bridges\source\cpp_uno\gcc3_solaris_sparc nmake - u br_gcc3sogs br_cppuno_shared br_unotypes br_inc NULL br bridges\source\cpp_uno\gcc3_solaris_sparc nmake - u br_gcc3sogs br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\gcc3_solaris_intel nmake - u br_gcc3sogi br_cppuno_shared br_unotypes br_inc NULL br bridges\source\cpp_uno\gcc3_solaris_intel nmake - u br_gcc3sogi br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\gcc3_netbsd_intel nmake - u br_gccni br_unotypes br_inc NULL br bridges\source\cpp_uno\gcc3_netbsd_intel nmake - u br_gccni br_unotypes br_inc NULL
br bridges\source\cpp_uno\gcc3_netbsd_x86-64 nmake - u br_gcc3nx br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\shared nmake - all br_cppuno_shared br_unotypes br_inc NULL br bridges\source\cpp_uno\shared nmake - all br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\jni_uno nmake - all br_jni_uno br_unotypes br_inc NULL br bridges\source\jni_uno nmake - all br_jni_uno br_unotypes br_inc NULL
br bridges\source\jni_uno\java\com\sun\star\bridges\jni_uno nmake - all br_jni_uno_java br_unotypes br_inc NULL br bridges\source\jni_uno\java\com\sun\star\bridges\jni_uno nmake - all br_jni_uno_java br_unotypes br_inc NULL
.text
.globl privateSnippetExecutorGeneral
.type privateSnippetExecutorGeneral,@function
privateSnippetExecutorGeneral:
.LFBg:
movl %esp,%ecx
pushl %ebp # proper stack frame needed for exception handling
.LCFIg0:
movl %esp,%ebp
.LCFIg1:
subl $0x4,%esp # 32bit returnValue
pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
pushl %eax # 32bit nFunctionIndex
call cpp_vtable_call
movl 16(%esp),%eax # 32bit returnValue
leave
ret
.LFEg:
.size privateSnippetExecutorGeneral,.-privateSnippetExecutorGeneral
.globl privateSnippetExecutorVoid
.type privateSnippetExecutorVoid,@function
privateSnippetExecutorVoid:
.LFBv:
movl %esp,%ecx
pushl %ebp # proper stack frame needed for exception handling
.LCFIv0:
movl %esp,%ebp
.LCFIv1:
pushl $0 # 32bit null pointer (returnValue not used)
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
pushl %eax # 32bit nFunctionIndex
call cpp_vtable_call
leave
ret
.LFEv:
.size privateSnippetExecutorVoid,.-privateSnippetExecutorVoid
.globl privateSnippetExecutorHyper
.type privateSnippetExecutorHyper,@function
privateSnippetExecutorHyper:
.LFBh:
movl %esp,%ecx
pushl %ebp # proper stack frame needed for exception handling
.LCFIh0:
movl %esp,%ebp
.LCFIh1:
subl $0x8,%esp # 64bit returnValue
pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
pushl %eax # 32bit nFunctionIndex
call cpp_vtable_call
movl 16(%esp),%eax # 64bit returnValue, lower half
movl 20(%esp),%edx # 64bit returnValue, upper half
leave
ret
.LFEh:
.size privateSnippetExecutorHyper,.-privateSnippetExecutorHyper
.globl privateSnippetExecutorFloat
.type privateSnippetExecutorFloat,@function
privateSnippetExecutorFloat:
.LFBf:
movl %esp,%ecx
pushl %ebp # proper stack frame needed for exception handling
.LCFIf0:
movl %esp,%ebp
.LCFIf1:
subl $0x4,%esp # 32bit returnValue
pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
pushl %eax # 32bit nFunctionIndex
call cpp_vtable_call
flds 16(%esp) # 32bit returnValue
leave
ret
.LFEf:
.size privateSnippetExecutorFloat,.-privateSnippetExecutorFloat
.globl privateSnippetExecutorDouble
.type privateSnippetExecutorDouble,@function
privateSnippetExecutorDouble:
.LFBd:
movl %esp,%ecx
pushl %ebp # proper stack frame needed for exception handling
.LCFId0:
movl %esp,%ebp
.LCFId1:
subl $0x8,%esp # 64bit returnValue
pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
pushl %eax # 32bit nFunctionIndex
call cpp_vtable_call
fldl 16(%esp) # 64bit returnValue
leave
ret
.LFEd:
.size privateSnippetExecutorDouble,.-privateSnippetExecutorDouble
.globl privateSnippetExecutorClass
.type privateSnippetExecutorClass,@function
privateSnippetExecutorClass:
.LFBc:
movl %esp,%ecx
pushl %ebp # proper stack frame needed for exception handling
.LCFIc0:
movl %esp,%ebp
.LCFIc1:
subl $0x4,%esp # 32bit returnValue
pushl %esp # 32bit &returnValue
pushl %ecx # 32bit pCallStack
pushl %edx # 32bit nVtableOffset
pushl %eax # 32bit nFunctionIndex
call cpp_vtable_call
movl 16(%esp),%eax # 32bit returnValue
leave
ret $4
.LFEc:
.size privateSnippetExecutorClass,.-privateSnippetExecutorClass
.section .eh_frame,"a",@progbits
.Lframe1:
.long .LECIE1-.LSCIE1 # length
.LSCIE1:
.long 0 # CIE_ID
.byte 1 # version
.string "zR" # augmentation
.uleb128 1 # code_alignment_factor
.sleb128 -4 # data_alignment_factor
.byte 8 # return_address_register
.uleb128 1 # augmentation size 1:
.byte 0x1B # FDE Encoding (pcrel sdata4)
# initial_instructions:
.byte 0x0C # DW_CFA_def_cfa %esp, 4
.uleb128 4
.uleb128 4
.byte 0x88 # DW_CFA_offset ret, 1
.uleb128 1
.align 4
.LECIE1:
.LSFDEg:
.long .LEFDEg-.LASFDEg # length
.LASFDEg:
.long .LASFDEg-.Lframe1 # CIE_pointer
.long .LFBg-. # initial_location
.long .LFEg-.LFBg # address_range
.uleb128 0 # augmentation size 0
# instructions:
.byte 0x04 # DW_CFA_advance_loc4
.long .LCFIg0-.LFBg
.byte 0x0E # DW_CFA_def_cfa_offset 8
.uleb128 8
.byte 0x85 # DW_CFA_offset %ebp, 2
.uleb128 2
.byte 0x04 # DW_CFA_advance_loc4
.long .LCFIg1-.LCFIg0
.byte 0x0D # DW_CFA_def_cfa_register %ebp
.uleb128 5
.align 4
.LEFDEg:
.LSFDEv:
.long .LEFDEv-.LASFDEv # length
.LASFDEv:
.long .LASFDEv-.Lframe1 # CIE_pointer
.long .LFBv-. # initial_location
.long .LFEv-.LFBv # address_range
.uleb128 0 # augmentation size 0
# instructions:
.byte 0x04 # DW_CFA_advance_loc4
.long .LCFIv0-.LFBv
.byte 0x0E # DW_CFA_def_cfa_offset 8
.uleb128 8
.byte 0x85 # DW_CFA_offset %ebp, 2
.uleb128 2
.byte 0x04 # DW_CFA_advance_loc4
.long .LCFIv1-.LCFIv0
.byte 0x0D # DW_CFA_def_cfa_register %ebp
.uleb128 5
.align 4
.LEFDEv:
.LSFDEh:
.long .LEFDEh-.LASFDEh # length
.LASFDEh:
.long .LASFDEh-.Lframe1 # CIE_pointer
.long .LFBh-. # initial_location
.long .LFEh-.LFBh # address_range
.uleb128 0 # augmentation size 0
# instructions:
.byte 0x04 # DW_CFA_advance_loc4
.long .LCFIh0-.LFBh
.byte 0x0E # DW_CFA_def_cfa_offset 8
.uleb128 8
.byte 0x85 # DW_CFA_offset %ebp, 2
.uleb128 2
.byte 0x04 # DW_CFA_advance_loc4
.long .LCFIh1-.LCFIh0
.byte 0x0D # DW_CFA_def_cfa_register %ebp
.uleb128 5
.align 4
.LEFDEh:
.LSFDEf:
.long .LEFDEf-.LASFDEf # length
.LASFDEf:
.long .LASFDEf-.Lframe1 # CIE_pointer
.long .LFBf-. # initial_location
.long .LFEf-.LFBf # address_range
.uleb128 0 # augmentation size 0
# instructions:
.byte 0x04 # DW_CFA_advance_loc4
.long .LCFIf0-.LFBf
.byte 0x0E # DW_CFA_def_cfa_offset 8
.uleb128 8
.byte 0x85 # DW_CFA_offset %ebp, 2
.uleb128 2
.byte 0x04 # DW_CFA_advance_loc4
.long .LCFIf1-.LCFIf0
.byte 0x0D # DW_CFA_def_cfa_register %ebp
.uleb128 5
.align 4
.LEFDEf:
.LSFDEd:
.long .LEFDEd-.LASFDEd # length
.LASFDEd:
.long .LASFDEd-.Lframe1 # CIE_pointer
.long .LFBd-. # initial_location
.long .LFEd-.LFBd # address_range
.uleb128 0 # augmentation size 0
# instructions:
.byte 0x04 # DW_CFA_advance_loc4
.long .LCFId0-.LFBd
.byte 0x0E # DW_CFA_def_cfa_offset 8
.uleb128 8
.byte 0x85 # DW_CFA_offset %ebp, 2
.uleb128 2
.byte 0x04 # DW_CFA_advance_loc4
.long .LCFId1-.LCFId0
.byte 0x0D # DW_CFA_def_cfa_register %ebp
.uleb128 5
.align 4
.LEFDEd:
.LSFDEc:
.long .LEFDEc-.LASFDEc # length
.LASFDEc:
.long .LASFDEc-.Lframe1 # CIE_pointer
.long .LFBc-. # initial_location
.long .LFEc-.LFBc # address_range
.uleb128 0 # augmentation size 0
# instructions:
.byte 0x04 # DW_CFA_advance_loc4
.long .LCFIc0-.LFBc
.byte 0x0E # DW_CFA_def_cfa_offset 8
.uleb128 8
.byte 0x85 # DW_CFA_offset %ebp, 2
.uleb128 2
.byte 0x04 # DW_CFA_advance_loc4
.long .LCFIc1-.LCFIc0
.byte 0x0D # DW_CFA_def_cfa_register %ebp
.uleb128 5
.align 4
.LEFDEc:
.section .note.GNU-stack,"",@progbits
...@@ -32,21 +32,20 @@ ...@@ -32,21 +32,20 @@
#include <dlfcn.h> #include <dlfcn.h>
#include <cxxabi.h> #include <cxxabi.h>
#include <hash_map> #include <hash_map>
#include <sys/param.h>
#include <rtl/strbuf.hxx> #include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <bridges/cpp_uno/bridge.hxx> #include <com/sun/star/uno/genfunc.hxx>
#include "com/sun/star/uno/RuntimeException.hpp"
#include <typelib/typedescription.hxx> #include <typelib/typedescription.hxx>
#include <uno/any2.h> #include <uno/any2.h>
#include "share.hxx" #include "share.hxx"
#ifndef RTLD_DEFAULT
#define RTLD_DEFAULT ((void *) -2)
#endif
using namespace ::std; using namespace ::std;
using namespace ::osl; using namespace ::osl;
...@@ -119,7 +118,11 @@ public: ...@@ -119,7 +118,11 @@ public:
}; };
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
RTTI::RTTI() SAL_THROW( () ) RTTI::RTTI() SAL_THROW( () )
: m_hApp( dlopen( 0 , RTLD_LAZY ) ) #if 1
: m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) )
#else
: m_hApp( dlopen( 0, RTLD_LAZY ) )
#endif
{ {
} }
//__________________________________________________________________________________________________ //__________________________________________________________________________________________________
...@@ -136,8 +139,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR ...@@ -136,8 +139,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName; OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
MutexGuard guard( m_mutex ); MutexGuard guard( m_mutex );
t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) ); t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) );
if (iFind == m_rttis.end()) if (iRttiFind == m_rttis.end())
{ {
// RTTI symbol // RTTI symbol
OStringBuffer buf( 64 ); OStringBuffer buf( 64 );
...@@ -154,7 +157,11 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR ...@@ -154,7 +157,11 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
buf.append( 'E' ); buf.append( 'E' );
OString symName( buf.makeStringAndClear() ); OString symName( buf.makeStringAndClear() );
#if 1 /* #i22253# */
rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() ); rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
#else
rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
#endif
if (rtti) if (rtti)
{ {
...@@ -201,7 +208,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR ...@@ -201,7 +208,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
} }
else else
{ {
rtti = iFind->second; rtti = iRttiFind->second;
} }
return rtti; return rtti;
...@@ -225,7 +232,7 @@ static void deleteException( void * pExc ) ...@@ -225,7 +232,7 @@ static void deleteException( void * pExc )
//================================================================================================== //==================================================================================================
void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{ {
#if defined DEBUG #if OSL_DEBUG_LEVEL > 1
OString cstr( OString cstr(
OUStringToOString( OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ), *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
...@@ -293,7 +300,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping ...@@ -293,7 +300,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
Reference< XInterface >() ); Reference< XInterface >() );
Type const & rType = ::getCppuType( &aRE ); Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG #if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) ); OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
OSL_ENSURE( 0, cstr.getStr() ); OSL_ENSURE( 0, cstr.getStr() );
#endif #endif
...@@ -302,7 +309,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping ...@@ -302,7 +309,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
typelib_TypeDescription * pExcTypeDescr = 0; typelib_TypeDescription * pExcTypeDescr = 0;
OUString unoName( toUNOname( header->exceptionType->name() ) ); OUString unoName( toUNOname( header->exceptionType->name() ) );
#if defined DEBUG #if OSL_DEBUG_LEVEL > 1
OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) ); OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() ); fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
#endif #endif
...@@ -314,7 +321,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping ...@@ -314,7 +321,7 @@ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping
Reference< XInterface >() ); Reference< XInterface >() );
Type const & rType = ::getCppuType( &aRE ); Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno ); uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
#if defined _DEBUG #if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) ); OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
OSL_ENSURE( 0, cstr.getStr() ); OSL_ENSURE( 0, cstr.getStr() );
#endif #endif
......
...@@ -44,12 +44,17 @@ ENABLE_EXCEPTIONS=TRUE ...@@ -44,12 +44,17 @@ ENABLE_EXCEPTIONS=TRUE
CFLAGS += -DLEAK_STATIC_DATA CFLAGS += -DLEAK_STATIC_DATA
.ENDIF .ENDIF
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
CFLAGSCXX += -fno-omit-frame-pointer
CFLAGSNOOPT=-O0 CFLAGSNOOPT=-O0
SLOFILES= \ SLOFILES= \
$(SLO)$/except.obj \ $(SLO)$/except.obj \
$(SLO)$/cpp2uno.obj \ $(SLO)$/cpp2uno.obj \
$(SLO)$/uno2cpp.obj $(SLO)$/uno2cpp.obj \
$(SLO)$/call.obj
SHL1TARGET= $(TARGET) SHL1TARGET= $(TARGET)
...@@ -58,10 +63,8 @@ SHL1IMPLIB=i$(TARGET) ...@@ -58,10 +63,8 @@ SHL1IMPLIB=i$(TARGET)
SHL1VERSIONMAP=..$/..$/bridge_exports.map SHL1VERSIONMAP=..$/..$/bridge_exports.map
SHL1RPATH=URELIB SHL1RPATH=URELIB
SHL1OBJS= \ SHL1OBJS = $(SLOFILES)
$(SLO)$/except.obj \ SHL1LIBS = $(SLB)$/cpp_uno_shared.lib
$(SLO)$/cpp2uno.obj \
$(SLO)$/uno2cpp.obj
SHL1STDLIBS= \ SHL1STDLIBS= \
$(CPPULIB) \ $(CPPULIB) \
...@@ -73,3 +76,6 @@ SHL1STDLIBS= \ ...@@ -73,3 +76,6 @@ SHL1STDLIBS= \
.INCLUDE : target.mk .INCLUDE : target.mk
$(SLO)$/%.obj: %.s
$(CC) -c -o $(SLO)$/$(@:b).o $<
touch $@
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
* *
************************************************************************/ ************************************************************************/
#include "uno/mapping.h"
#include <typeinfo> #include <typeinfo>
#include <exception> #include <exception>
#include <cstddef> #include <cstddef>
...@@ -32,6 +34,8 @@ ...@@ -32,6 +34,8 @@
namespace CPPU_CURRENT_NAMESPACE namespace CPPU_CURRENT_NAMESPACE
{ {
void dummy_can_throw_anything( char const * );
// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
struct _Unwind_Exception struct _Unwind_Exception
......
This diff is collapsed.
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _BRIDGES_CPP_UNO_X86_64_ABI_HXX_
#define _BRIDGES_CPP_UNO_X86_64_ABI_HXX_
// This is an implementation of the x86-64 ABI as described in 'System V
// Application Binary Interface, AMD64 Architecture Processor Supplement'
// (http://www.x86-64.org/documentation/abi-0.95.pdf)
#include <typelib/typedescription.hxx>
namespace x86_64
{
/* 6 general purpose registers are used for parameter passing */
const sal_uInt32 MAX_GPR_REGS = 6;
/* 8 SSE registers are used for parameter passing */
const sal_uInt32 MAX_SSE_REGS = 8;
/* Count number of required registers.
Examine the argument and return set number of register required in each
class.
Return false iff parameter should be passed in memory.
*/
bool examine_argument( typelib_TypeDescriptionReference *pTypeRef, bool bInReturn, int &nUsedGPR, int &nUsedSSE );
/** Does function that returns this type use a hidden parameter, or registers?
The value can be returned either in a hidden 1st parameter (which is a
pointer to a structure allocated by the caller), or in registers (rax, rdx
for the integers, xmm0, xmm1 for the floating point numbers).
*/
bool return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef );
void fill_struct( typelib_TypeDescriptionReference *pTypeRef, void * const *pGPR, void * const *pSSE, void *pStruct );
} // namespace x86_64
#endif // _BRIDGES_CPP_UNO_X86_64_ABI_HXX_
.text
.align 2
.globl privateSnippetExecutor
.type privateSnippetExecutor, @function
privateSnippetExecutor:
.LFB3:
pushq %rbp
.LCFI0:
movq %rsp, %rbp
.LCFI1:
subq $160, %rsp
.LCFI2:
movq %r10, -152(%rbp) # Save (nVtableOffset << 32) + nFunctionIndex
movq %rdi, -112(%rbp) # Save GP registers
movq %rsi, -104(%rbp)
movq %rdx, -96(%rbp)
movq %rcx, -88(%rbp)
movq %r8 , -80(%rbp)
movq %r9 , -72(%rbp)
movsd %xmm0, -64(%rbp) # Save FP registers
movsd %xmm1, -56(%rbp)
movsd %xmm2, -48(%rbp)
movsd %xmm3, -40(%rbp)
movsd %xmm4, -32(%rbp)
movsd %xmm5, -24(%rbp)
movsd %xmm6, -16(%rbp)
movsd %xmm7, -8(%rbp)
leaq -144(%rbp), %r9 # 6th param: sal_uInt64 * pRegisterReturn
leaq 16(%rbp), %r8 # 5rd param: void ** ovrflw
leaq -64(%rbp), %rcx # 4th param: void ** fpreg
leaq -112(%rbp), %rdx # 3rd param: void ** gpreg
movl -148(%rbp), %esi # 2nd param: sal_int32 nVtableOffset
movl -152(%rbp), %edi # 1st param: sal_int32 nFunctionIndex
call cpp_vtable_call
cmp $10, %rax # typelib_TypeClass_FLOAT
je .Lfloat
cmp $11, %rax # typelib_TypeClass_DOUBLE
je .Lfloat
movq -144(%rbp), %rax # Return value (int case)
jmp .Lfinish
.Lfloat:
movlpd -144(%rbp), %xmm0 # Return value (float/double case)
.Lfinish:
leave
ret
.LFE3:
.size privateSnippetExecutor, .-privateSnippetExecutor
.section .eh_frame,"a",@progbits
.Lframe1:
.long .LECIE1-.LSCIE1
.LSCIE1:
.long 0x0
.byte 0x1
.string "zR"
.uleb128 0x1
.sleb128 -8
.byte 0x10
.uleb128 0x1
.byte 0x1b
.byte 0xc
.uleb128 0x7
.uleb128 0x8
.byte 0x90
.uleb128 0x1
.align 8
.LECIE1:
.LSFDE1:
.long .LEFDE1-.LASFDE1
.LASFDE1:
.long .LASFDE1-.Lframe1
.long .LFB3-.
.long .LFE3-.LFB3
.uleb128 0x0
.byte 0x4
.long .LCFI0-.LFB3
.byte 0xe
.uleb128 0x10
.byte 0x86
.uleb128 0x2
.byte 0x4
.long .LCFI1-.LCFI0
.byte 0xd
.uleb128 0x6
.align 8
.LEFDE1:
.section .note.GNU-stack,"",@progbits
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=..$/..$/..
PRJNAME=bridges
TARGET=gcc3_uno
LIBTARGET=no
ENABLE_EXCEPTIONS=TRUE
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
# --- Files --------------------------------------------------------
.IF "$(COM)$(OS)$(CPU)$(COMNAME)" == "GCCNETBSDXgcc3"
.IF "$(cppu_no_leak)" == ""
CFLAGS += -DLEAK_STATIC_DATA
.ENDIF
# In case someone enabled the non-standard -fomit-frame-pointer which does not
# work with the .cxx sources in this directory:
CFLAGSCXX += -fno-omit-frame-pointer
SLOFILES= \
$(SLO)$/abi.obj \
$(SLO)$/except.obj \
$(SLO)$/cpp2uno.obj \
$(SLO)$/uno2cpp.obj \
$(SLO)$/call.obj
SHL1TARGET= $(TARGET)
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
SHL1IMPLIB=i$(TARGET)
SHL1VERSIONMAP=..$/..$/bridge_exports.map
SHL1RPATH=URELIB
SHL1OBJS = $(SLOFILES)
SHL1LIBS = $(SLB)$/cpp_uno_shared.lib
SHL1STDLIBS= \
$(CPPULIB) \
$(SALLIB)
.ENDIF
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
$(SLO)$/%.obj: %.s
$(CC) -c -o $(SLO)$/$(@:b).o $<
touch $@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#include "uno/mapping.h"
#include <typeinfo>
#include <exception>
#include <cstddef>
namespace CPPU_CURRENT_NAMESPACE
{
void dummy_can_throw_anything( char const * );
// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
struct _Unwind_Exception
{
unsigned exception_class __attribute__((__mode__(__DI__)));
void * exception_cleanup;
unsigned private_1 __attribute__((__mode__(__word__)));
unsigned private_2 __attribute__((__mode__(__word__)));
} __attribute__((__aligned__));
struct __cxa_exception
{
::std::type_info *exceptionType;
void (*exceptionDestructor)(void *);
::std::unexpected_handler unexpectedHandler;
::std::terminate_handler terminateHandler;
__cxa_exception *nextException;
int handlerCount;
int handlerSwitchValue;
const unsigned char *actionRecord;
const unsigned char *languageSpecificData;
void *catchTemp;
void *adjustedPtr;
_Unwind_Exception unwindHeader;
};
extern "C" void *__cxa_allocate_exception(
std::size_t thrown_size ) throw();
extern "C" void __cxa_throw (
void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
struct __cxa_eh_globals
{
__cxa_exception *caughtExceptions;
unsigned int uncaughtExceptions;
};
extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
// -----
//==================================================================================================
void raiseException(
uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
//==================================================================================================
void fillUnoException(
__cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
}
...@@ -66,11 +66,14 @@ extern "C" { ...@@ -66,11 +66,14 @@ extern "C" {
#ifdef NETBSD #ifdef NETBSD
# include <machine/endian.h> # include <machine/endian.h>
# if BYTE_ORDER == LITTLE_ENDIAN # if BYTE_ORDER == LITTLE_ENDIAN
# define _LITTLE_ENDIAN # undef _BIG_ENDIAN
# undef _PDP_ENDIAN
# elif BYTE_ORDER == BIG_ENDIAN # elif BYTE_ORDER == BIG_ENDIAN
# define _BIG_ENDIAN # undef _LITTLE_ENDIAN
# undef _PDP_ENDIAN
# elif BYTE_ORDER == PDP_ENDIAN # elif BYTE_ORDER == PDP_ENDIAN
# define _PDP_ENDIAN # undef _LITTLE_ENDIAN
# undef _BIG_ENDIAN
# endif # endif
#endif #endif
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
************************************************************************/ ************************************************************************/
#if defined (SOLARIS) || (FREEBSD) #if defined (SOLARIS) || defined (FREEBSD) || defined (NETBSD)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -39,7 +39,7 @@ int backtrace( void **buffer, int max_frames ); ...@@ -39,7 +39,7 @@ int backtrace( void **buffer, int max_frames );
void backtrace_symbols_fd( void **buffer, int size, int fd ); void backtrace_symbols_fd( void **buffer, int size, int fd );
/* no frame.h on FreeBSD */ /* no frame.h on FreeBSD */
#if defined FREEBSD #if defined (FREEBSD) || defined (NETBSD)
struct frame { struct frame {
long arg0[8]; long arg0[8];
long arg1[6]; long arg1[6];
......
...@@ -178,7 +178,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI ...@@ -178,7 +178,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI
#ifdef HAVE_STATFS_H #ifdef HAVE_STATFS_H
#if defined(FREEBSD) || defined(NETBSD) || defined(MACOSX) #if defined(FREEBSD) || defined(MACOSX)
# define __OSL_STATFS_STRUCT struct statfs # define __OSL_STATFS_STRUCT struct statfs
# define __OSL_STATFS(dir, sfs) statfs((dir), (sfs)) # define __OSL_STATFS(dir, sfs) statfs((dir), (sfs))
# define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_bsize)) # define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_bsize))
...@@ -190,7 +190,33 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI ...@@ -190,7 +190,33 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI
of the target platforms fix it!!!! */ of the target platforms fix it!!!! */
# define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (1) # define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (1)
# define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (1) # define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (1)
#endif /* FREEBSD || NETBSD || MACOSX */ #endif /* FREEBSD || MACOSX */
#if defined(NETBSD)
#include <sys/param.h>
/* statvfs() replaced statfs() in 2.99.9 */
# if __NetBSD_Version__ >= 299000900
/* 2.0D or later */
# define __OSL_STATFS_STRUCT struct statvfs
# define __OSL_STATFS(dir, sfs) statvfs((dir), (sfs))
# define __OSL_STATFS_ISREMOTE(a) (((a).f_flag & ST_LOCAL) == 0)
# else
/* version before 2.0D */
# define __OSL_STATFS_STRUCT struct statfs
# define __OSL_STATFS(dir, sfs) statfs((dir), (sfs))
# define __OSL_STATFS_ISREMOTE(a) (((a).f_type & MNT_LOCAL) == 0)
# endif /* >2.0D */
# define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_bsize))
# define __OSL_STATFS_TYPENAME(a) ((a).f_fstypename)
# define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (strcmp((a).f_fstypename, "msdos") != 0 && strcmp((a).f_fstypename, "ntfs") != 0 && strcmp((a).f_fstypename, "smbfs") != 0)
# define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (strcmp((a).f_fstypename, "msdos") != 0)
#endif /* NETBSD */
#if defined(LINUX) #if defined(LINUX)
# define __OSL_NFS_SUPER_MAGIC 0x6969 # define __OSL_NFS_SUPER_MAGIC 0x6969
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
static pthread_mutex_t getrtl_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t getrtl_mutex = PTHREAD_MUTEX_INITIALIZER;
/* struct passwd differs on some platforms */ /* struct passwd differs on some platforms */
#if defined NETBSD #if defined NETBSD && (__NetBSD_Version__ < 299001000)
struct passwd *getpwnam_r(const char* name, struct passwd* s, char* buffer, int size ) struct passwd *getpwnam_r(const char* name, struct passwd* s, char* buffer, int size )
{ {
struct passwd* res; struct passwd* res;
......
...@@ -131,7 +131,10 @@ ...@@ -131,7 +131,10 @@
#endif #endif
#ifdef NETBSD #ifdef NETBSD
# define ETIME ETIMEDOUT # include <sys/param.h>
# ifndef ETIME
# define ETIME ETIMEDOUT
# endif
# define _POSIX_THREAD_SYSCALL_SOFT 1 # define _POSIX_THREAD_SYSCALL_SOFT 1
# include <pthread.h> # include <pthread.h>
# include <netdb.h> # include <netdb.h>
...@@ -478,7 +481,9 @@ extern int sem_post(sem_t* sem); ...@@ -478,7 +481,9 @@ extern int sem_post(sem_t* sem);
#ifdef NO_PTHREAD_RTL #ifdef NO_PTHREAD_RTL
#if !defined FREEBSD || (__FreeBSD_version < 500112) #if !defined FREEBSD || (__FreeBSD_version < 500112)
#if !defined NETBSD
struct passwd *getpwent_r(struct passwd *pwd, char *buffer, int buflen); struct passwd *getpwent_r(struct passwd *pwd, char *buffer, int buflen);
#endif
extern struct spwd *getspnam_r(const char *name, struct spwd *result, extern struct spwd *getspnam_r(const char *name, struct spwd *result,
char *buffer, int buflen); char *buffer, int buflen);
......
...@@ -30,6 +30,9 @@ ...@@ -30,6 +30,9 @@
/*****************************************************************/ /*****************************************************************/
#include <stdio.h> #include <stdio.h>
#if defined(NETBSD)
#include <paths.h>
#endif
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
...@@ -68,6 +71,9 @@ oslFileError SAL_CALL osl_getTempDirURL( rtl_uString** pustrTempDir ) ...@@ -68,6 +71,9 @@ oslFileError SAL_CALL osl_getTempDirURL( rtl_uString** pustrTempDir )
#if defined(SOLARIS) || defined (LINUX) || defined (FREEBSD) #if defined(SOLARIS) || defined (LINUX) || defined (FREEBSD)
if ( !pValue ) if ( !pValue )
pValue = P_tmpdir; pValue = P_tmpdir;
#elif defined(NETBSD)
if ( !pValue )
pValue = _PATH_TMP;
#endif #endif
} }
#endif /* MACOSX */ #endif /* MACOSX */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment