LibreOffice Module bridges (master)  1
gcc3_linux_ia64/share.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 #pragma once
20 
21 #include "uno/mapping.h"
22 
23 #include <typeinfo>
24 #include <exception>
25 #include <cstddef>
26 #include "vtablefactory.hxx"
27 
28 namespace CPPU_CURRENT_NAMESPACE
29 {
30 
31  void dummy_can_throw_anything( char const * );
32 
33 
34 // ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
35 
36 struct _Unwind_Exception
37 {
38  unsigned exception_class __attribute__((__mode__(__DI__)));
39  void * exception_cleanup;
40  unsigned private_1 __attribute__((__mode__(__word__)));
41  unsigned private_2 __attribute__((__mode__(__word__)));
42 } __attribute__((__aligned__));
43 
44 struct __cxa_exception
45 {
46  std::type_info *exceptionType;
47  void (*exceptionDestructor)(void *);
48 
49  void (*unexpectedHandler)(); // std::unexpected_handler dropped from C++17
50  std::terminate_handler terminateHandler;
51 
52  __cxa_exception *nextException;
53 
54  int handlerCount;
55 
57  const unsigned char *actionRecord;
58  const unsigned char *languageSpecificData;
59  void *catchTemp;
60  void *adjustedPtr;
61 
62  _Unwind_Exception unwindHeader;
63 };
64 
65 extern "C" void *__cxa_allocate_exception(
66  std::size_t thrown_size ) throw();
67 extern "C" void __cxa_throw (
68  void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
69 
70 struct __cxa_eh_globals
71 {
72  __cxa_exception *caughtExceptions;
73  unsigned int uncaughtExceptions;
74 };
75 
76 extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
77 extern "C" std::type_info *__cxa_current_exception_type() throw();
78 
79 void raiseException(
80  uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
81 
82 void fillUnoException(uno_Any *, uno_Mapping * pCpp2Uno);
83 }
84 
85 namespace ia64
86 {
88 
89  bool return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef );
90  bool return_via_r8_buffer( typelib_TypeDescriptionReference *pTypeRef );
91 
92  struct RegReturn
93  {
94  long r8;
95  long r9;
96  long r10;
97  long r11;
98  };
99 }
100 
101 namespace bridges
102 {
103  namespace cpp_uno
104  {
105  namespace shared
106  {
107  /*
108  http://www.swag.uwaterloo.ca/asx/ABI.html
109  On Itanium, function pointers are pairs: the function address followed
110  by the global pointer value that should be used when calling the
111  function (code address, gp value)
112  */
113  struct VtableFactory::Slot
114  {
115  sal_uInt64 code_address;
116  sal_uInt64 gp_value;
117  };
118  }
119  }
120 }
121 
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
unsigned _Unwind_Ptr __attribute__((__mode__(__pointer__)))
struct _uno_Mapping uno_Mapping
Definition: msvc/except.hxx:32
void fillUnoException(uno_Any *pExc, uno_Mapping *pCpp2Uno)
void * __cxa_allocate_exception(std::size_t thrown_size)
bool return_via_r8_buffer(typelib_TypeDescriptionReference *pTypeRef)
bool return_in_hidden_param(typelib_TypeDescriptionReference *pTypeRef)
Does function that returns this type use a hidden parameter, or registers?
std::type_info * __cxa_current_exception_type()
struct _uno_Any uno_Any
Definition: msvc/except.hxx:31
void __cxa_throw(void *thrown_exception, std::type_info *tinfo, void(*dest)(void *)) __attribute__((noreturn))
void raiseException(uno_Any *pUnoExc, uno_Mapping *pUno2Cpp)
__cxa_eh_globals * __cxa_get_globals()
void dummy_can_throw_anything(char const *)
unsigned exception_class __attribute__((__mode__(__DI__)))
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo