26 const typelib_CompoundTypeDescription*
p
27 =
reinterpret_cast<const typelib_CompoundTypeDescription*
>(pTypeDescr);
28 int sum =
p->nMembers;
29 for (sal_Int32
i = 0;
i <
p->nMembers; ++
i)
31 typelib_TypeDescriptionReference* pTypeInStruct =
p->ppTypeRefs[
i];
33 switch (pTypeInStruct->eTypeClass)
35 case typelib_TypeClass_STRUCT:
38 TYPELIB_DANGER_GET(&
t, pTypeInStruct);
41 TYPELIB_DANGER_RELEASE(
t);
44 case typelib_TypeClass_CHAR:
45 case typelib_TypeClass_BOOLEAN:
46 case typelib_TypeClass_BYTE:
47 case typelib_TypeClass_SHORT:
48 case typelib_TypeClass_UNSIGNED_SHORT:
49 case typelib_TypeClass_LONG:
50 case typelib_TypeClass_UNSIGNED_LONG:
51 case typelib_TypeClass_HYPER:
52 case typelib_TypeClass_UNSIGNED_HYPER:
53 case typelib_TypeClass_ENUM:
58 case typelib_TypeClass_FLOAT:
59 case typelib_TypeClass_DOUBLE:
73 switch (pTypeRef->eTypeClass)
75 case typelib_TypeClass_CHAR:
76 case typelib_TypeClass_BOOLEAN:
77 case typelib_TypeClass_BYTE:
78 case typelib_TypeClass_SHORT:
79 case typelib_TypeClass_UNSIGNED_SHORT:
80 case typelib_TypeClass_LONG:
81 case typelib_TypeClass_UNSIGNED_LONG:
82 case typelib_TypeClass_HYPER:
83 case typelib_TypeClass_UNSIGNED_HYPER:
84 case typelib_TypeClass_ENUM:
85 return ReturnKind::RegistersInt;
86 case typelib_TypeClass_FLOAT:
87 case typelib_TypeClass_DOUBLE:
88 return ReturnKind::RegistersFp;
89 case typelib_TypeClass_STRUCT:
93 TYPELIB_DANGER_GET(&pTypeDescr, pTypeRef);
95 TYPELIB_DANGER_RELEASE(pTypeDescr);
96 if ((sum == 1 || sum == 2) && sum == regs.
nr_fp)
97 return ReturnKind::RegistersFp;
101 return ReturnKind::RegistersIntFp;
103 return ReturnKind::RegistersFpInt;
105 return ReturnKind::RegistersInt;
108 return ReturnKind::RegistersInt;
113 double* fret,
void* pRegisterReturn)
118 case ReturnKind::RegistersFp:
119 reinterpret_cast<double*
>(pRegisterReturn)[0] = fret[0];
120 reinterpret_cast<double*
>(pRegisterReturn)[1] = fret[1];
122 case ReturnKind::RegistersFpInt:
123 reinterpret_cast<double*
>(pRegisterReturn)[0] = fret[0];
124 reinterpret_cast<sal_Int64*
>(pRegisterReturn)[1] = gret[0];
126 case ReturnKind::RegistersIntFp:
127 reinterpret_cast<sal_Int64*
>(pRegisterReturn)[0] = gret[0];
128 reinterpret_cast<double*
>(pRegisterReturn)[1] = fret[0];
131 reinterpret_cast<sal_Int64*
>(pRegisterReturn)[0] = gret[0];
132 reinterpret_cast<sal_Int64*
>(pRegisterReturn)[1] = gret[1];
struct _typelib_TypeDescription typelib_TypeDescription
ReturnKind getReturnKind(typelib_TypeDescription const *type)
ReturnKind getReturnKind(typelib_TypeDescriptionReference *type)
void fillReturn(typelib_TypeDescriptionReference *pTypeRef, sal_Int64 *gret, double *fret, void *pRegisterReturn)
int flatten_struct(typelib_TypeDescription *pTypeDescr, Registers ®s)