Commit Graph
2249 Commits
Author SHA1 Message Date
jan Iversen 5747ed0514 iOS, simplified assembler
RC of cpp_vtable_call is never used in the asm part, so remove it.

Change-Id: Iabda12541fbb574a21395a8430c52a3e9f892947
2018-03-20 13:17:52 +01:00
jan Iversen b9cf7da290 iOS, balanced return stack
stack balenced for entering and exiting _privateSnippetExecutor

Change-Id: I381c487d3412a39b113e9725807fd018b2b4036a
2018-03-17 21:33:43 +01:00
jan Iversen 8c3d134718 iOS update unwind abi to v. 26
Change-Id: Id149b6a17dec8e6030d78e235c7451b2244152d1
2018-03-17 08:04:00 +01:00
jan Iversen 8a8663a49b iOS, solved call stack problem.
Stack was not corrupted, but the call stack was not intact when
passing the assembler code.

Change-Id: If07909dce2b4a73634a130e5f50e84312115b845
2018-03-16 20:30:33 +01:00
jan Iversen 09d842887d iOS, added description of __cxa_throw
Change-Id: I6a537957528a0d2de989b347bde1167e21544236
2018-03-16 09:21:50 +01:00
jan Iversen aab3bffeb8 iOS, move assembler constants to C++
Change-Id: Iad94a2e2e55bb158d2ac42e3a67a6d94f84ffedd
2018-03-15 19:57:32 +01:00
jan Iversen d47749c769 iOS, simplified bridge assembler code.
Use x14 and x15 as function and offset instead of
having x15 as a pointer to 2 words.

Change-Id: I1cb3af4e86e3abe1b56fba2509eda31af0435885
2018-03-15 19:41:15 +01:00
jan Iversen 1caf3b9380 iOS, solved corrupted stack in cpp -> uno
Solved problem in assembler code, so the call chain is correct.

There are still something missing for uno to work correctly

Change-Id: Ieb3b3d6b15153576159e07b52ced0efedd135713
2018-03-15 13:28:25 +01:00
jan Iversen 814bd40070 iOS, calling cpp_vtable_call does not corrupt stack
Changing bl -> b (jump long to jump) allowed cpp_vtable_call
to work without corrumping the stack.

However return still corrumpts the stack.

Change-Id: I3437a73139b65af13dcf6fa0c959bb1c847564b9
2018-03-11 19:09:16 +01:00
jan Iversen 056bc3cf26 iOS, moved privateSnippetExecutor from asm to C function.
move asm code to C as first step towards reducing the asm code.
Since iOS does not permit java/python or anything else than the
compiled C++ code, the throw should be done simpler.

Apart from that this is the first step in solving a stack
corruption problem in the throw code

Change-Id: I4f3d3a3ba3f55fb46131d9a8eeb0deebf179d95f
2018-03-11 19:09:15 +01:00
jan Iversen 5facd232c1 iOS, removed unneeded #ifdef arm64
Change-Id: Ie568c461ae834b33b9220c4b9fb42ec66b5e7ce0
2018-03-11 17:22:03 +01:00
jan Iversen 6ec77e28f1 iOS, revert bed135e02b
using USE_DOUBLE_MMAP worked well on the device, but caused
problems with the simulator, that depends on the GCC3_MAC* implementation.

Change-Id: Ifbc1d48b3642567029c5271054a545eaacaf18ed
2018-03-11 17:22:03 +01:00
jan Iversen 02f6aa7355 iOS, removed perl script in bridges
The perl script just generated static asm code, this
code is now included directly in ios64_helper.s

Change-Id: I3ebc6f85865287e1a1d11f82be72fc2407bcb40f
2018-03-11 09:21:42 +01:00
jan Iversen dc275890d6 iOS, typo in function decl.
Change-Id: I269f5323ed0f984cfe9d28636a9cae84a863e7a6
2018-03-11 09:21:30 +01:00
jan Iversen bed135e02b iOS, activate USE_DOUBLE_MMAP
If not activated code assumes dymanic behaivour.

Change-Id: I6b2807f4a2402a7adfa0839454586b425ee1ae29
2018-03-11 08:15:03 +01:00
jan Iversen be65314d13 bridges,iOS removed suport for x86 and arm.
Only arm64 is supported, code is more readable

Change-Id: I6940b0d03dc26c9c8f10c1cb105a7564471f2ca5
2018-03-11 08:14:50 +01:00
Kacper Kasper 9c036b1d3d Make LibreOffice buildable on Haiku.
* Obviously VCL wiring is missing, but most components do build.

Change-Id: Ie853ada1423a8f4c2b647be59cd47a7730c42978
Reviewed-on: https://gerrit.libreoffice.org/50293
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-03-05 14:17:27 +01:00
jan Iversen 32288245d5 iOS, solved problem with -I for asm module
Change-Id: I9e699eea04231eeeff4146657124ee4f0e68412d
2018-02-21 10:34:29 +01:00
jan Iversen 61f3c760e5 iOS, remove throw definition
clean cpp_uno part.

Change-Id: Ief08e4cf596b375243ae215d8dc2e1cdb5830ac1
2018-02-20 10:32:30 +01:00
Kacper Kasper 60f1490af9 Buildsystem changes to recognize Haiku.
Change-Id: I219d556f8e124cfe426cc1ac3c54da34eb7ef790
Reviewed-on: https://gerrit.libreoffice.org/49925
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-02-19 12:58:11 +01:00
jan Iversen 4c0dec9988 iOS, add custom include for codesnippets.S
Change-Id: I285838f6f3e8ec57a63239f71a403809154c47e2
2018-02-17 09:05:18 +01:00
jan Iversen 3a91ebb89d iOS, readded perl script to generate codesnippets
Change-Id: Ie9f3aa8057e9b50beedf47ff892188cf3b362194
2018-02-17 09:05:18 +01:00
jan Iversen f563a81000 iOS, add old snippet script.
We need to check if the script generated the same code always.
Looks like nFunIndexes is never changed.

Change-Id: Ic247cccbf1e4a75e6a0acf5807fdcf84bfcf4cb3
2018-02-15 18:02:19 +01:00
jan Iversen 4b86076d5e iOS, update to original files
Update to old files (from Tor in 2013) to prepare for generate.

Change-Id: I832a242b7b91179e9c269fa9e48a1698aa2f2a66
2018-02-15 18:02:19 +01:00
jan Iversen 9a62dcf333 iOS, reduce arm64 files to actually needed
Still comparing the "old" gcc3_ios_arm with the new one, in order to make
the asm code work.

Change-Id: I3a2fdfc1891a6a4d7065917f5ef8bd19c49b3987
2018-02-15 15:58:58 +01:00
jan Iversen 54a5b5d7f3 iOS, add gcc3 helper for ARM64
Change-Id: Iad8cfd72803864bd1c8a5d01c74e1f856c27685d
2018-02-14 15:03:31 +01:00
jan Iversen 968cc46060 iOS, simulator == MACOSX
the simulator is a normal MAC compile, with different SDK
so the cpp_uno bindings should be identical

Change-Id: Ie53463beab628414185b492c78dcb3d8364794bf
2018-02-14 15:03:31 +01:00
jan Iversen 342ea409a6 iOS, use gcc3 mac code for simulator
Refer to the mac code, instead of copying it to gcc3_ios, when
running in simulator.

There is a problem with the macro calls, so the reference to the sources
are duplicated.

Change-Id: I72848ba960b8a7f85708723bfeb682ceecc1e448
2018-02-14 15:03:31 +01:00
Mike Kaganski 82e3833995 bridges: MSVC: pragma warning: make more specific, remove obsolete
Change-Id: Ib13f198e5941a33a9a8d1091c8ceb48e273f00cc
Reviewed-on: https://gerrit.libreoffice.org/48949
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-01-31 21:02:42 +01:00
Andrea Gelmini fbf42a4f13 Fix typos
Change-Id: I13acf050d83099be8874514688936bb4ddbb1a26
Reviewed-on: https://gerrit.libreoffice.org/48543
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-25 08:38:01 +01:00
Stephan Bergmann 9af8f190ed More loplugin:cstylecast on Windows
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after
cab0427cad "Enable loplugin:cstylecast for some
more cases" and a409d32e7f "More
loplugin:cstylecast"

Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862
Reviewed-on: https://gerrit.libreoffice.org/48317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-23 07:54:51 +01:00
Stephan Bergmann fc528a4680 More loplugin:cstylecast on macOS
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after
cab0427cad "Enable loplugin:cstylecast for some
more cases" and a409d32e7f "More
loplugin:cstylecast"

Change-Id: Iff4877e8a42804c952c48c13332caf0a83c92870
Reviewed-on: https://gerrit.libreoffice.org/48216
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-20 10:45:48 +01:00
Stephan Bergmann 697f01e052 SAL_W32 is just an alias for _WIN32
...so consistently use the latter instead of the former

Change-Id: I144d5e7c472632f93b2258461510346bc85892d9
Reviewed-on: https://gerrit.libreoffice.org/48135
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-19 08:19:38 +01:00
Christian Lohmaier 63860c399b enable c++17 for android again after boost auto_ptr has a workaround
see 90d2155912 for boost fix and
see effe6b3d84 for bridges fix for mac

Change-Id: Ic6209ce0927dafd39763ef0b2fabbcaa7abf743f
Reviewed-on: https://gerrit.libreoffice.org/46002
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins <ci@libreoffice.org>
2018-01-18 19:33:52 +01:00
Christian Lohmaier 4082a18406 android: use unified headers and llvm-c++ STL (x86) with NDK 16
gnustl (and others) are to be removed in future versions of the ndk
also bump gradle and build-tools to current versions along with it

arm unfortunately crashes with llvm-c++, so keep with gnustl for now/fix
that later

Change-Id: Ic794c3293b599b77ec48096bf3283a99c09cbb79
Reviewed-on: https://gerrit.libreoffice.org/45163
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-01-18 14:44:25 +01:00
Andrea Gelmini 624f84c07e Fix typos
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a
Reviewed-on: https://gerrit.libreoffice.org/47855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-16 12:40:51 +01:00
Stephan Bergmann 9bd84cfb52 More loplugin:cstylecast: bridges
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable
loplugin:cstylecast for some more cases" plus
solenv/clang-format/reformat-formatted-files

Change-Id: I4d48f46fa64fe866081cd85c731a93b4bfcdf787
2018-01-12 20:28:57 +01:00
Noel Grandin 783120996a new loplugin: convertlong
merge the droplong and convertuintptr into one new plugin.
Limit the analysis to looking at var decl's, since that seems to be
safest proposition, even if that too needs some careful analysis.

Change-Id: Id005baaf05cfb157ce44a06a1c81f08559a07d1f
Reviewed-on: https://gerrit.libreoffice.org/46851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-21 08:22:29 +01:00
Noel Grandin 3af500580b loplugin:salcall fix functions
since cdecl is the default calling convention on Windows for
such functions, the annotation is redundant.

Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d
Reviewed-on: https://gerrit.libreoffice.org/46164
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11 12:13:46 +01:00
Michael Stahl 9e52685ebd bridges: [loplugin:includeform] gcc3_linux_intel
Change-Id: I0a60521e893990af63d723871edcbc564b135074
2017-12-08 21:40:34 +01:00
Stephan Bergmann effe6b3d84 std::unexpected_handler is gone at least from recent libc++ in C++17 mode
Change-Id: Ibae0499f52c1e22ec9790e62cc84053dff2c2add
Reviewed-on: https://gerrit.libreoffice.org/45855
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-05 13:10:10 +01:00
Noel Grandin 68f8645752 new loplugin salcall: remove unnecessary SAL_CALL
In this first commit, I use the plugin to verify the consistency of our
SAL_CALL annotations.
The point being to make the next commit more mechanical in nature,
purely using the rewriter.

There are various chunks of unix-only code that have never had to be
compiled by MSVC, hence the inconsistencies.

In bridges, I had to inline some typedefs to make the verification code
happy, since it cannot see into typedefs.

Change-Id: Iec6e274bed857febf7295cfcf5e9f21fe4a34da0
Reviewed-on: https://gerrit.libreoffice.org/45502
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-04 07:24:52 +01:00
David Tardon 897c07bda2 fix includes in aarch64 bridge
Change-Id: Ia27f15483c27bc43a3cd3a74432f15fa928ad6da
2017-11-26 16:06:10 +01:00
Stephan Bergmann 80cbc18c6d Fix ASan "alloc-dealloc-mismatch (operator new [] vs operator delete)"
...e.g. during CppunitTest_smoketest, after
be2d9d3407 "Clean up m_generatedRttis at exit"

Change-Id: Ife4b07927ba11cf5b99e987b3bb9af068652ba62
2017-11-14 11:44:12 +01:00
Caolán McNamara 70fa619184 ofz: Direct-leak
asan reports that the strdups leak and __si_class_type_info takes a
const char* arg

Change-Id: Ie0ee94554689d9246981cb7d6ce0f23917c2d333
Reviewed-on: https://gerrit.libreoffice.org/44641
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-13 10:16:05 +01:00
Stephan Bergmann be2d9d3407 Clean up m_generatedRttis at exit
...inspired by <https://gerrit.libreoffice.org/#/c/44487/> "silence
RTTI::getRTTI Direct-leak".  (std::type_info is guaranteed to have a virtual
dtor.)

Change-Id: I972bfd57a2e800ef0e9bfc978fdc6345dbff853e
Reviewed-on: https://gerrit.libreoffice.org/44532
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-09 15:33:53 +01:00
jan Iversen 78f6fadca5 iOS include error in bridges
Need to use "" for call.hxx include

Change-Id: I9a30f3d3cfab83076f9ad22a5b637f8f4fc7c432
2017-11-03 08:03:28 +01:00
Stephan Bergmann 6fa4f9b848 loplugin:includeform: bridges (Windows)
Change-Id: I4514d751d5449902c589c7f3577c7f3cd593d2e9
2017-10-27 19:28:53 +02:00
Noel Grandin d9b6f4fd38 loplugin:constmethods in unotools
Change-Id: I13df4e184a826682f34a1d9e974b601397ba4a3d
Reviewed-on: https://gerrit.libreoffice.org/43865
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26 10:59:42 +02:00
Stephan Bergmann f17bc7f551 loplugin:includeform: bridges (macOS)
Change-Id: I9df97c6684de7dfc60f79dd11abaed069e5f08b2
2017-10-24 11:55:28 +02:00