summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx102
-rw-r--r--bridges/source/cpp_uno/msvc_win32_arm64/abi.hxx2
-rw-r--r--bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx26
-rw-r--r--bridges/source/cpp_uno/msvc_win32_arm64/uno2cpp.cxx22
4 files changed, 1 insertions, 151 deletions
diff --git a/bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx b/bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx
index b8a1c73fb6f3..fbfdb1f34f40 100644
--- a/bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_arm64/abi.cxx
@@ -18,96 +18,11 @@
*/
#include <sal/config.h>
-#include <sal/types.h>
#include <cassert>
#include "abi.hxx"
-enum StructKind
-{
- STRUCT_KIND_EMPTY,
- STRUCT_KIND_FLOAT,
- STRUCT_KIND_DOUBLE,
- STRUCT_KIND_POD,
- STRUCT_KIND_DTOR
-};
-
-static StructKind getStructKind(typelib_CompoundTypeDescription const* type)
-{
- StructKind k = type->pBaseTypeDescription == 0 ? STRUCT_KIND_EMPTY
- : getStructKind(type->pBaseTypeDescription);
-
- for (sal_Int32 i = 0; i != type->nMembers; ++i)
- {
- StructKind k2 = StructKind();
- switch (type->ppTypeRefs[i]->eTypeClass)
- {
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_UNSIGNED_SHORT:
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_ENUM:
- k2 = STRUCT_KIND_POD;
- break;
- case typelib_TypeClass_FLOAT:
- k2 = STRUCT_KIND_FLOAT;
- break;
- case typelib_TypeClass_DOUBLE:
- k2 = STRUCT_KIND_DOUBLE;
- break;
- case typelib_TypeClass_STRING:
- case typelib_TypeClass_TYPE:
- case typelib_TypeClass_ANY:
- case typelib_TypeClass_SEQUENCE:
- case typelib_TypeClass_INTERFACE:
- k2 = STRUCT_KIND_DTOR;
- break;
- case typelib_TypeClass_STRUCT:
- {
- typelib_TypeDescription* td = 0;
- TYPELIB_DANGER_GET(&td, type->ppTypeRefs[i]);
- k2 = getStructKind(reinterpret_cast<typelib_CompoundTypeDescription const*>(td));
- TYPELIB_DANGER_RELEASE(td);
- break;
- }
- default:
- assert(false);
- }
- switch (k2)
- {
- case STRUCT_KIND_EMPTY:
- // this means an empty sub-object, which nevertheless obtains a byte
- // of storage (TODO: does it?), so the full object cannot be a
- // homogeneous collection of float or double
- case STRUCT_KIND_POD:
- assert(k != STRUCT_KIND_DTOR);
- k = STRUCT_KIND_POD;
- break;
- case STRUCT_KIND_FLOAT:
- case STRUCT_KIND_DOUBLE:
- if (k == STRUCT_KIND_EMPTY)
- {
- k = k2;
- }
- else if (k != k2)
- {
- assert(k != STRUCT_KIND_DTOR);
- k = STRUCT_KIND_POD;
- }
- break;
- case STRUCT_KIND_DTOR:
- return STRUCT_KIND_DTOR;
- }
- }
- return k;
-}
-
ReturnKind getReturnKind(typelib_TypeDescription const* type)
{
switch (type->eTypeClass)
@@ -134,24 +49,9 @@ ReturnKind getReturnKind(typelib_TypeDescription const* type)
case typelib_TypeClass_TYPE:
case typelib_TypeClass_ANY:
case typelib_TypeClass_SEQUENCE:
+ case typelib_TypeClass_STRUCT:
case typelib_TypeClass_INTERFACE:
return RETURN_KIND_INDIRECT;
- case typelib_TypeClass_STRUCT:
- if (type->nSize > 16)
- {
- return RETURN_KIND_INDIRECT;
- }
- switch (getStructKind(reinterpret_cast<typelib_CompoundTypeDescription const*>(type)))
- {
- case STRUCT_KIND_FLOAT:
- return RETURN_KIND_INDIRECT;
- case STRUCT_KIND_DOUBLE:
- return RETURN_KIND_INDIRECT;
- case STRUCT_KIND_DTOR:
- return RETURN_KIND_INDIRECT;
- default:
- return RETURN_KIND_INDIRECT;
- }
}
}
diff --git a/bridges/source/cpp_uno/msvc_win32_arm64/abi.hxx b/bridges/source/cpp_uno/msvc_win32_arm64/abi.hxx
index 38a61161ca62..f815685a8a49 100644
--- a/bridges/source/cpp_uno/msvc_win32_arm64/abi.hxx
+++ b/bridges/source/cpp_uno/msvc_win32_arm64/abi.hxx
@@ -24,8 +24,6 @@
enum ReturnKind
{
RETURN_KIND_REG,
- RETURN_KIND_HFA_FLOAT,
- RETURN_KIND_HFA_DOUBLE,
RETURN_KIND_INDIRECT
};
diff --git a/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx b/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
index a43cd3e24698..9a79ce543940 100644
--- a/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_arm64/cpp2uno.cxx
@@ -201,32 +201,6 @@ void call(bridges::cpp_uno::shared::CppInterfaceProxy* proxy,
assert(false);
}
break;
- case RETURN_KIND_HFA_FLOAT:
- assert(rtd != 0);
- switch (rtd->nSize)
- {
- case 16:
- std::memcpy(fpr + 3, static_cast<char*>(retin) + 12, 4);
- [[fallthrough]];
- case 12:
- std::memcpy(fpr + 2, static_cast<char*>(retin) + 8, 4);
- [[fallthrough]];
- case 8:
- std::memcpy(fpr + 1, static_cast<char*>(retin) + 4, 4);
- [[fallthrough]];
- case 4:
- std::memcpy(fpr, retin, 4);
- break;
- default:
- assert(false);
- }
- assert(!retConv);
- break;
- case RETURN_KIND_HFA_DOUBLE:
- assert(rtd != 0);
- std::memcpy(fpr, retin, rtd->nSize);
- assert(!retConv);
- break;
case RETURN_KIND_INDIRECT:
retout = indirectRet;
gpr[0] = reinterpret_cast<sal_uInt64>(retout);
diff --git a/bridges/source/cpp_uno/msvc_win32_arm64/uno2cpp.cxx b/bridges/source/cpp_uno/msvc_win32_arm64/uno2cpp.cxx
index abb911448535..b753509a8a6e 100644
--- a/bridges/source/cpp_uno/msvc_win32_arm64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_arm64/uno2cpp.cxx
@@ -226,28 +226,6 @@ void call(bridges::cpp_uno::shared::UnoInterfaceProxy* pProxy,
assert(false);
}
break;
- case RETURN_KIND_HFA_FLOAT:
- switch (aReturnTD->nSize)
- {
- case 16:
- std::memcpy(static_cast<char*>(ret) + 12, fpr + 3, 4);
- [[fallthrough]];
- case 12:
- std::memcpy(static_cast<char*>(ret) + 8, fpr + 2, 4);
- [[fallthrough]];
- case 8:
- std::memcpy(static_cast<char*>(ret) + 4, fpr + 1, 4);
- [[fallthrough]];
- case 4:
- std::memcpy(ret, fpr, 4);
- break;
- default:
- assert(false);
- }
- break;
- case RETURN_KIND_HFA_DOUBLE:
- std::memcpy(ret, fpr, aReturnTD->nSize);
- break;
case RETURN_KIND_INDIRECT:
break;
}