LibreOffice Module bridges (master)  1
gcc3_linux_sparc/cpp2uno.cxx
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 
20 #include <com/sun/star/uno/genfunc.hxx>
21 #include <sal/log.hxx>
22 #include <typelib/typedescription.hxx>
23 #include <uno/data.h>
24 #include "bridge.hxx"
25 #include "cppinterfaceproxy.hxx"
26 #include "types.hxx"
27 #include "vtablefactory.hxx"
28 #include "share.hxx"
29 
30 using namespace com::sun::star::uno;
31 
32 namespace
33 {
34 
35 static typelib_TypeClass cpp2uno_call(
37  const typelib_TypeDescription * pMemberTypeDescr,
38  typelib_TypeDescriptionReference * pReturnTypeRef, // 0 indicates void return
39  sal_Int32 nParams, typelib_MethodParameter * pParams,
40  void ** pCallStack,
41  sal_Int64 * pRegisterReturn /* space for register return */ )
42 {
43  // pCallStack: [ret ptr], this, params
44  char * pCppStack = (char *)pCallStack;
45 
46  // return
47  typelib_TypeDescription * pReturnTypeDescr = 0;
48  if (pReturnTypeRef)
49  TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
50 
51  void * pUnoReturn = 0;
52  void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
53 
54  if (pReturnTypeDescr)
55  {
56  if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
57  pUnoReturn = pRegisterReturn; // direct way for simple types
58  else // complex return via ptr (pCppReturn)
59  {
60  pCppReturn = *(void**)pCppStack;
62  pReturnTypeDescr )
63  ? alloca( pReturnTypeDescr->nSize )
64  : pCppReturn); // direct way
65  pCppStack += sizeof( void* );
66  }
67  }
68  // pop this
69  pCppStack += sizeof( void* );
70 
71  // stack space
72  static_assert(sizeof(void *) == sizeof(sal_Int32), "### unexpected size!");
73  // parameters
74  void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
75  void ** pCppArgs = pUnoArgs + nParams;
76  // indices of values this have to be converted (interface conversion cpp<=>uno)
77  sal_Int32 * pTempIndices = (sal_Int32 *)(pUnoArgs + (2 * nParams));
78  // type descriptions for reconversions
79  typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
80 
81  sal_Int32 nTempIndices = 0;
82 
83  for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
84  {
85  const typelib_MethodParameter & rParam = pParams[nPos];
86  typelib_TypeDescription * pParamTypeDescr = 0;
87  TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
88 
89  if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr )) // value
90  {
91  pCppArgs[nPos] = pUnoArgs[nPos] = CPPU_CURRENT_NAMESPACE::adjustPointer(pCppStack, pParamTypeDescr);
92  switch (pParamTypeDescr->eTypeClass)
93  {
94  case typelib_TypeClass_HYPER:
95  case typelib_TypeClass_UNSIGNED_HYPER:
96  case typelib_TypeClass_DOUBLE:
97  {
98  if ((reinterpret_cast< long >(pCppStack) & 7) != 0)
99  {
100  static_assert(sizeof (double) == sizeof (sal_Int64), "boo");
101  void * pDest = alloca( sizeof (sal_Int64) );
102  *reinterpret_cast< sal_Int32 * >(pDest) =
103  *reinterpret_cast< sal_Int32 const * >(pCppStack);
104  *(reinterpret_cast< sal_Int32 * >(pDest) + 1) =
105  *(reinterpret_cast< sal_Int32 const * >(pCppStack) + 1);
106  pCppArgs[nPos] = pUnoArgs[nPos] = pDest;
107  }
108  pCppStack += sizeof (sal_Int32); // extra long
109  break;
110  default:
111  break;
112  }
113  }
114  // no longer needed
115  TYPELIB_DANGER_RELEASE( pParamTypeDescr );
116  }
117  else // ptr to complex value | ref
118  {
119  pCppArgs[nPos] = *(void **)pCppStack;
120 
121  if (! rParam.bIn) // is pure out
122  {
123  // uno out is unconstructed mem!
124  pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize );
125  pTempIndices[nTempIndices] = nPos;
126  // will be released at reconversion
127  ppTempParamTypeDescr[nTempIndices++] = pParamTypeDescr;
128  }
129  // is in/inout
131  pParamTypeDescr ))
132  {
133  uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
134  *(void **)pCppStack, pParamTypeDescr,
135  pThis->getBridge()->getCpp2Uno() );
136  pTempIndices[nTempIndices] = nPos; // has to be reconverted
137  // will be released at reconversion
138  ppTempParamTypeDescr[nTempIndices++] = pParamTypeDescr;
139  }
140  else // direct way
141  {
142  pUnoArgs[nPos] = *(void **)pCppStack;
143  // no longer needed
144  TYPELIB_DANGER_RELEASE( pParamTypeDescr );
145  }
146  }
147  pCppStack += sizeof(sal_Int32); // standard parameter length
148  }
149 
150  // ExceptionHolder
151  uno_Any aUnoExc; // Any will be constructed by callee
152  uno_Any * pUnoExc = &aUnoExc;
153 
154  // invoke uno dispatch call
155  (*pThis->getUnoI()->pDispatcher)(pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
156 
157  // in case an exception occurred...
158  if (pUnoExc)
159  {
160  // destruct temporary in/inout params
161  for ( ; nTempIndices--; )
162  {
163  sal_Int32 nIndex = pTempIndices[nTempIndices];
164 
165  if (pParams[nIndex].bIn) // is in/inout => was constructed
166  uno_destructData( pUnoArgs[nIndex], ppTempParamTypeDescr[nTempIndices], 0 );
167  TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndices] );
168  }
169  if (pReturnTypeDescr)
170  TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
172  // has to destruct the any
173  // is here for dummy
174  return typelib_TypeClass_VOID;
175  }
176  else // else no exception occurred...
177  {
178  // temporary params
179  for ( ; nTempIndices--; )
180  {
181  sal_Int32 nIndex = pTempIndices[nTempIndices];
182  typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndices];
183 
184  if (pParams[nIndex].bOut) // inout/out
185  {
186  // convert and assign
187  uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
188  uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex], pParamTypeDescr,
189  pThis->getBridge()->getUno2Cpp() );
190  }
191  // destroy temp uno param
192  uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
193 
194  TYPELIB_DANGER_RELEASE( pParamTypeDescr );
195  }
196  // return
197  if (pCppReturn) // has complex return
198  {
199  if (pUnoReturn != pCppReturn) // needs reconversion
200  {
201  uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr,
202  pThis->getBridge()->getUno2Cpp() );
203  // destroy temp uno return
204  uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
205  }
206  // complex return ptr is set to eax
207  *(void **)pRegisterReturn = pCppReturn;
208  }
209  if (pReturnTypeDescr)
210  {
211  typelib_TypeClass eRet = (typelib_TypeClass)pReturnTypeDescr->eTypeClass;
212  TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
213  return eRet;
214  }
215  else
216  return typelib_TypeClass_VOID;
217  }
218 }
219 
220 
221 static typelib_TypeClass cpp_mediate(
222  sal_Int32 nFunctionIndex,
223  sal_Int32 nVtableOffset,
224  void ** pCallStack,
225  sal_Int64 * pRegisterReturn /* space for register return */ )
226 {
227  static_assert(sizeof(sal_Int32)==sizeof(void *), "### unexpected!");
228 
229  // pCallStack: this, params
230  // eventual [ret*] lies at pCallStack -1
231  // so count down pCallStack by one to keep it simple
232  // pCallStack: this, params
233  // eventual [ret*] lies at pCallStack -1
234  // so count down pCallStack by one to keep it simple
237  static_cast< char * >(*pCallStack) - nVtableOffset);
238  if ((nFunctionIndex & 0x80000000) != 0) {
239  nFunctionIndex &= 0x7FFFFFFF;
240  --pCallStack;
241  }
242 
243  typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
244 
245  if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
246  {
247  SAL_WARN(
248  "bridges",
249  "illegal " << OUString::unacquired(&pTypeDescr->aBase.pTypeName)
250  << " vtable index " << nFunctionIndex << "/"
251  << pTypeDescr->nMapFunctionIndexToMemberIndex);
252  throw RuntimeException(
253  ("illegal " + OUString::unacquired(&pTypeDescr->aBase.pTypeName)
254  + " vtable index " + OUString::number(nFunctionIndex) + "/"
255  + OUString::number(pTypeDescr->nMapFunctionIndexToMemberIndex)),
256  (XInterface *)pCppI);
257  }
258 
259  // determine called method
260  sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
261  assert(nMemberPos < pTypeDescr->nAllMembers);
262 
263  TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
264 
265 #if defined BRIDGES_DEBUG
266  OString cstr( OUStringToOString( aMemberDescr.get()->pTypeName, RTL_TEXTENCODING_ASCII_US ) );
267  fprintf( stderr, "calling %s, nFunctionIndex=%d\n", cstr.getStr(), nFunctionIndex );
268 #endif
269 
270  typelib_TypeClass eRet;
271  switch (aMemberDescr.get()->eTypeClass)
272  {
273  case typelib_TypeClass_INTERFACE_ATTRIBUTE:
274  {
275  if (pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nFunctionIndex)
276  {
277  // is GET method
278  eRet = cpp2uno_call(
279  pCppI, aMemberDescr.get(),
280  ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef,
281  0, 0, // no params
282  pCallStack, pRegisterReturn );
283  }
284  else
285  {
286  // is SET method
287  typelib_MethodParameter aParam;
288  aParam.pTypeRef =
289  ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
290  aParam.bIn = sal_True;
291  aParam.bOut = sal_False;
292 
293  eRet = cpp2uno_call(
294  pCppI, aMemberDescr.get(),
295  0, // indicates void return
296  1, &aParam,
297  pCallStack, pRegisterReturn );
298  }
299  break;
300  }
301  case typelib_TypeClass_INTERFACE_METHOD:
302  {
303  // is METHOD
304  switch (nFunctionIndex)
305  {
306  case 1: // acquire()
307  pCppI->acquireProxy(); // non virtual call!
308  eRet = typelib_TypeClass_VOID;
309  break;
310  case 2: // release()
311  pCppI->releaseProxy(); // non virtual call!
312  eRet = typelib_TypeClass_VOID;
313  break;
314  case 0: // queryInterface() opt
315  {
316  typelib_TypeDescription * pTD = 0;
317  TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pCallStack[2] )->getTypeLibType() );
318  if (pTD)
319  {
320  XInterface * pInterface = 0;
321  (*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
322  pCppI->getBridge()->getCppEnv(),
323  (void **)&pInterface, pCppI->getOid().pData, (typelib_InterfaceTypeDescription *)pTD );
324 
325  if (pInterface)
326  {
327  ::uno_any_construct(
328  reinterpret_cast< uno_Any * >( pCallStack[0] ),
329  &pInterface, pTD, cpp_acquire );
330  pInterface->release();
331  TYPELIB_DANGER_RELEASE( pTD );
332  *(void **)pRegisterReturn = pCallStack[0];
333  eRet = typelib_TypeClass_ANY;
334  break;
335  }
336  TYPELIB_DANGER_RELEASE( pTD );
337  }
338  } // else perform queryInterface()
339  default:
340  eRet = cpp2uno_call(
341  pCppI, aMemberDescr.get(),
342  ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pReturnTypeRef,
343  ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->nParams,
344  ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pParams,
345  pCallStack, pRegisterReturn );
346  }
347  break;
348  }
349  default:
350  {
351  throw RuntimeException( "no member description found!", (XInterface *)pCppI );
352  }
353  }
354  return eRet;
355 }
356 
357 
362 static void cpp_vtable_call()
363 {
364  sal_Int64 nRegReturn;
365  int nFunctionIndex;
366  void** pCallStack;
367  int vTableOffset;
368 
369 void * pRegReturn = &nRegReturn;
370 
371  __asm__( "st %%i0, %0\n\t"
372  "st %%i1, %1\n\t"
373  "st %%i2, %2\n\t"
374  : : "m"(nFunctionIndex), "m"(pCallStack), "m"(vTableOffset) );
375 
376 // fprintf(stderr,"cpp_mediate nFunctionIndex=%x\n",nFunctionIndex);
377 // fflush(stderr);
378 
379  const sal_Bool bComplex = (nFunctionIndex & 0x80000000) ? sal_True : sal_False;
380  typelib_TypeClass aType =
381  cpp_mediate( nFunctionIndex, vTableOffset, pCallStack+17, (sal_Int64*)&nRegReturn );
382 
383  switch( aType )
384  {
385  case typelib_TypeClass_BOOLEAN:
386  case typelib_TypeClass_BYTE:
387  __asm__( "ld %0, %%l0\n\t"
388  "ldsb [%%l0], %%i0\n"
389  : : "m"(pRegReturn) );
390  break;
391  case typelib_TypeClass_CHAR:
392  case typelib_TypeClass_SHORT:
393  case typelib_TypeClass_UNSIGNED_SHORT:
394  __asm__( "ld %0, %%l0\n\t"
395  "ldsh [%%l0], %%i0\n"
396  : : "m"(pRegReturn) );
397  break;
398  case typelib_TypeClass_HYPER:
399  case typelib_TypeClass_UNSIGNED_HYPER:
400  __asm__( "ld %0, %%l0\n\t"
401  "ld [%%l0], %%i0\n\t"
402  "add %%l0, 4, %%l0\n\t"
403  "ld [%%l0], %%i1\n\t"
404  : : "m"(pRegReturn) );
405 
406  break;
407  case typelib_TypeClass_FLOAT:
408  __asm__( "ld %0, %%l0\n\t"
409  "ld [%%l0], %%f0\n"
410  : : "m"(pRegReturn) );
411  break;
412  case typelib_TypeClass_DOUBLE:
413  __asm__( "ld %0, %%l0\n\t"
414  "ldd [%%l0], %%f0\n"
415  : : "m"(pRegReturn) );
416  break;
417  case typelib_TypeClass_VOID:
418  break;
419  default:
420  __asm__( "ld %0, %%l0\n\t"
421  "ld [%%l0], %%i0\n"
422  : : "m"(pRegReturn) );
423  break;
424  }
425 
426  if( bComplex )
427  {
428  __asm__( "add %i7, 4, %i7\n\t" );
429  // after call to complex return valued function there is an unimp instruction
430  }
431 
432 }
433 
434 
435 int const codeSnippetSize = 56;
436 unsigned char * codeSnippet(
437  unsigned char * code, sal_Int32 functionIndex, sal_Int32 vtableOffset,
438  bool simpleRetType)
439 {
440  sal_uInt32 index = functionIndex;
441  if (!simpleRetType) {
442  index |= 0x80000000;
443  }
444  unsigned int * p = reinterpret_cast< unsigned int * >(code);
445  static_assert(sizeof (unsigned int) == 4, "boo");
446  // st %o0, [%sp+68]:
447  *p++ = 0xD023A044;
448  // st %o1, [%sp+72]:
449  *p++ = 0xD223A048;
450  // st %o2, [%sp+76]:
451  *p++ = 0xD423A04C;
452  // st %o3, [%sp+80]:
453  *p++ = 0xD623A050;
454  // st %o4, [%sp+84]:
455  *p++ = 0xD823A054;
456  // st %o5, [%sp+88]:
457  *p++ = 0xDA23A058;
458  // sethi %hi(index), %o0:
459  *p++ = 0x11000000 | (index >> 10);
460  // or %o0, %lo(index), %o0:
461  *p++ = 0x90122000 | (index & 0x3FF);
462  // sethi %hi(vtableOffset), %o2:
463  *p++ = 0x15000000 | (vtableOffset >> 10);
464  // or %o2, %lo(vtableOffset), %o2:
465  *p++ = 0x9412A000 | (vtableOffset & 0x3FF);
466  // sethi %hi(cpp_vtable_call), %o3:
467  *p++ = 0x17000000 | (reinterpret_cast< unsigned int >(cpp_vtable_call) >> 10);
468  // or %o3, %lo(cpp_vtable_call), %o3:
469  *p++ = 0x9612E000 | (reinterpret_cast< unsigned int >(cpp_vtable_call) & 0x3FF);
470  // jmpl %o3, %g0:
471  *p++ = 0x81C2C000;
472  // mov %sp, %o1:
473  *p++ = 0x9210000E;
474  assert(reinterpret_cast< unsigned char * >(p) - code <= codeSnippetSize);
475  return code + codeSnippetSize;
476 }
477 
478 } //end of namespace
479 
481 
484 {
485  return static_cast< Slot * >(block) + 2;
486 }
487 
489  sal_Int32 slotCount)
490 {
491  return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
492 }
493 
496  void * block, sal_Int32 slotCount, sal_Int32,
497  typelib_InterfaceTypeDescription *)
498 {
499  Slot * slots = mapBlockToVtable(block);
500  slots[-2].fn = 0; //null
501  slots[-1].fn = 0; //destructor
502  return slots + slotCount;
503 }
504 
506  Slot ** slots, unsigned char * code, sal_PtrDiff writetoexecdiff,
507  typelib_InterfaceTypeDescription const * type, sal_Int32 functionOffset,
508  sal_Int32 functionCount, sal_Int32 vTableOffset)
509 {
510  (*slots) -= functionCount;
511  Slot * s = *slots;
512  for (sal_Int32 i = 0; i < type->nMembers; ++i) {
513  typelib_TypeDescription * member = 0;
514  TYPELIB_DANGER_GET(&member, type->ppMembers[i]);
515  assert(member != 0);
516  switch (member->eTypeClass) {
517  case typelib_TypeClass_INTERFACE_ATTRIBUTE:
518  // Getter:
519  (s++)->fn = code + writetoexecdiff;
520  code = codeSnippet(
521  code, functionOffset++, vTableOffset,
523  reinterpret_cast<
524  typelib_InterfaceAttributeTypeDescription * >(
525  member)->pAttributeTypeRef));
526  // Setter:
527  if (!reinterpret_cast<
528  typelib_InterfaceAttributeTypeDescription * >(
529  member)->bReadOnly)
530  {
531  (s++)->fn = code + writetoexecdiff;
532  code = codeSnippet(code, functionOffset++, vTableOffset, true);
533  }
534  break;
535 
536  case typelib_TypeClass_INTERFACE_METHOD:
537  (s++)->fn = code + writetoexecdiff;
538  code = codeSnippet(
539  code, functionOffset++, vTableOffset,
541  reinterpret_cast<
542  typelib_InterfaceMethodTypeDescription * >(
543  member)->pReturnTypeRef));
544  break;
545 
546  default:
547  assert(false);
548  break;
549  }
550  TYPELIB_DANGER_RELEASE(member);
551  }
552  return code;
553 }
554 
555 // use flush code from cc50_solaris_sparc
556 
557 extern "C" void doFlushCode(unsigned long address, unsigned long count);
558 
560  unsigned char const * begin, unsigned char const * end)
561 {
562  unsigned long n = end - begin;
563  if (n != 0) {
564  unsigned long adr = reinterpret_cast< unsigned long >(begin);
565  unsigned long off = adr & 7;
566  doFlushCode(adr - off, (n + off + 7) >> 3);
567  }
568 }
569 
570 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int32 nIndex
void SAL_CALL uno_destructData(void *pValue, typelib_TypeDescription *pTypeDescr, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
sal_Int64 n
bool isSimpleType(typelib_TypeClass typeClass)
Determines whether a type is a "simple" type (VOID, BOOLEAN, BYTE, SHORT, UNSIGNED SHORT...
Definition: types.cxx:28
static std::size_t getBlockSize(sal_Int32 slotCount)
Calculate the size of a raw vtable block.
const int codeSnippetSize
bool relatesToInterfaceType(typelib_TypeDescription const *type)
Determines whether a type relates to an interface type (is itself an interface type, or might contain entities of interface type).
Definition: types.cxx:41
static Slot * initializeBlock(void *block, sal_Int32 slotCount, sal_Int32 vtableNumber, typelib_InterfaceTypeDescription *type)
Initialize a raw vtable block.
typelib_TypeClass __cdecl cpp_mediate(void **pCallStack, const sal_Int32 nFunctionIndex, const sal_Int32 nVtableOffset, sal_Int64 *const pRegisterReturn)
char * adjustPointer(char *pIn, typelib_TypeDescription *pType)
static Slot * mapBlockToVtable(void *block)
Given a pointer to a block, turn it into a vtable pointer.
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
struct _uno_Any uno_Any
Definition: msvc/except.hxx:31
uno_Mapping * getUno2Cpp()
Definition: bridge.hxx:73
uno_ExtEnvironment * getCppEnv()
Definition: bridge.hxx:69
static unsigned char * addLocalFunctions(Slot **slots, unsigned char *code, sal_PtrDiff writetoexecdiff, typelib_InterfaceTypeDescription const *type, sal_Int32 functionOffset, sal_Int32 functionCount, sal_Int32 vtableOffset)
Fill the vtable slots corresponding to all local (i.e., not inherited) functions of a given interface...
typelib_InterfaceTypeDescription * getTypeDescr()
A cpp proxy wrapping a uno interface.
int i
#define sal_True
unsigned char sal_Bool
void SAL_CALL uno_copyAndConvertData(void *pDest, void *pSource, typelib_TypeDescription *pTypeDescr, uno_Mapping *mapping) SAL_THROW_EXTERN_C()
tuple index
struct _typelib_TypeDescription typelib_TypeDescription
Definition: msvc/except.hxx:52
uno_Mapping * getCpp2Uno()
Definition: bridge.hxx:72
register sal_uInt32 r28 __asm__("%r28")
void raiseException(uno_Any *pUnoExc, uno_Mapping *pUno2Cpp)
static int cpp2uno_call(bridges::cpp_uno::shared::CppInterfaceProxy *pThis, const typelib_TypeDescription *pMemberTypeDescr, typelib_TypeDescriptionReference *pReturnTypeRef, sal_Int32 nParams, typelib_MethodParameter *pParams, void **gpreg, void **fpreg, void **ovrflw, sal_uInt64 *pRegisterReturn)
void doFlushCode(unsigned long address, unsigned long count)
static unsigned char * codeSnippet(unsigned char *code, sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset, bool bHasHiddenParam)
void cpp_vtable_call(sal_Int32 func, sal_Int32 offset, void **pStack)
is called on incoming vtable calls (called by asm snippets)
#define sal_False
static void flushCode(unsigned char const *begin, unsigned char const *end)
Flush all the generated code snippets of a vtable, on platforms that require it.
void * p
#define SAL_WARN(area, stream)
static CppInterfaceProxy * castInterfaceToProxy(void *pInterface)
sal_uInt16 nPos