aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/stubs/ExecutableAllocator.h
Commit message (Collapse)AuthorAgeFilesLines
* V4: Generate function tables on 64bit windowsUlf Hermann2018-12-031-0/+1
| | | | | | | | | | | | | | In order for global exception handlers to be called reliably, the runtime needs to unwind through JIT-generated code. This can be facilitated by installing a "function table" for each JITed function that specifies "use the frame pointer". Also make sure to generate a function table for JIT'ed regular expressions. Those were forgotten also in the linux case. Fixes: QTBUG-50061 Change-Id: Ib0b8ae9356ed80afe1cab017e36efa4ccbe73f90 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-10-011-2/+2
|\ | | | | | | | | | | | | Conflicts: src/quick/items/qquickevents_p_p.h Change-Id: I8c699aeb46903e2ea80a97a346cb5af460859a98
| * Fix Integrity OS allocator memory attributesJanne Koskinen2018-09-281-2/+2
| | | | | | | | | | | | | | | | | | Correctly set the attributes when allocation is extending to more than one page. Code spanning multiple pages can now be executed. Task-number: QTBUG-70350 Change-Id: I02af1add274f80befda5662d9670bfd2052c3c52 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Update Yarr to the latest version from WebKitLars Knoll2018-08-101-2/+2
|/ | | | | | | | | | | Updated Yarr to a to commit 4d2a53d60487cb1f8b2a9a1e9f684af336fd7d2c in WebKit. Adjusted the yarr code base to work with our older version of wtf and masm. Change-Id: I04b4593ece051e1d7aa087b87aa08c92595d1098 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Enable JIT on INTEGRITY ARM64Kimmo Ollila2018-04-261-0/+8
| | | | | | | | This patch enables JIT on INTEGRITY s820Am and other ARM64 builds Change-Id: I2fa130f41a6c5bc6aa86bcfd5a01c2d431300561 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Nikola Velinov <nvelinov@ghs.com>
* Fix crash when generating cache filesSimon Hausmann2017-02-081-1/+6
| | | | | | | | | Make sure that the allocator in bootstrap builds really just allocates memory for the generated code and otherwise doesn't try to allocate executable memory. Change-Id: Ic40724903706ae98ef272a028e7d8299400e232b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Include the ARMv7 assembler in the qmldevtools bootstrap buildSimon Hausmann2017-02-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Even when the C++ target is not ARMv7 we want to include it in order to be able to generate QML cache files with code ahead of time. This requires a few changes: * The Jump classes need to move from the AbstractMacroAssembler super-class into the concrete assembler sub-class, in order to use it in specializations. * Some of the template specializations in LinkBuffer for example or for platform dependent operations need to be pre-processor enabled when bootstrapping * The generic loadPtr/addPtr etc. functions need to move to the concrete assemblers to be able to call the correct 32-bit or 64-bit variations. * We need to force what looks like a loss of precision to the compiler in the 32-bit ARMv7 linking code when linking jumps. Finally then we can explicitly instantiate at least QV4::JIT::Assembler for ARMv7 when bootstrapping. Currently only on x86-64 hosts, but that is a temporary limitation. Change-Id: I501db2360e1fded48f17f17d9e87252d47f8537e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove support for WinRT 8.1 and Windows Phone 8.1Maurice Kalinowski2017-01-191-11/+2
| | | | | | Task-number: QTBUG-57288 Change-Id: Id106f09dc824fbd95780dc5b479e16802d183e57 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QNX: Fix compilationRafael Roquetto2016-03-091-0/+4
| | | | | | | QNX only export library functions into the std namespace. Change-Id: Id5c479bb8b4540e26edabd6f50bc0f3f32e72432 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* WinRT: Enable JIT for x86/x64 target platformsMaurice Kalinowski2016-01-161-0/+5
| | | | | | | | | | | | | | | | | | | | | This only works for Windows 10 and later. Setting the "Code Generation" capability in the manifest, WinRT applications can use JIT for Windows 10 Desktop. Update the Allocator in regards to this and also update the VirtualProtectFromApp section. When the engine gets initialized, check for marking an area as executable. If it fails, fallback to interpreter mode. This does not affect ARM platforms, as we do not have calling conventions yet. It is implicitly disabled as V4_ENABLE_JIT is not defined. [ChangeLog][WinRT] Enable JIT for x86/x64 targets on Windows 10 and later. Change-Id: Ie05add5263f71387c5ce98456b9bec86c6c07ceb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* V4 JIT: Switch all platforms to W^X for the ExecutableAllocator.Erik Verbruggen2016-01-151-22/+52
| | | | | | | | This also fixes makeWritable, which needs to work in order to add more c0d3 to used pages. Also finish the WinRT parts. Change-Id: Idaa4187b1ec256e65c881285a608f3a51fdbeebd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* WinRT: fix warningsMaurice Kalinowski2015-05-191-0/+3
| | | | | | Change-Id: If11db499d743cbe79959145ecfcbcfec896a6845 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Fix build on WinRTAndrew Knight2013-11-061-0/+2
| | | | | | | | Disable JIT and avoid unsupported functions under WinRT. Also add MSVC's ARM flag to the double conversion white list. Change-Id: I22ec340a20b113fdeefb802ac61812f78a527895 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow delayed deallocation in the executable memory allocatorSimon Hausmann2013-09-201-1/+1
| | | | | | | | | Allow for allocations to outlive the allocator itself. When the allocator dies, it invalidates any remaining non-free allocations, making them safe to delete later. Change-Id: I6c71cddbbd5dcaff1ad50f3991a3c710d4f96737 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix module name (QtQml) in the license header under src/3rdpartySergio Ahumada2013-06-261-2/+2
| | | | | | | | Also updating the copyright year to 2013 Change-Id: I743d93d13d1841e13600f7353c4fe3e05bbd7c32 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix exception handling not working reliably on x86/x86-64 Linux (Part 2)Simon Hausmann2013-05-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The registration of the unwind tables is done through the interposition of the _Unwind_Find_FDE symbol from libgcc. Unfortunately that interposition breaks when libgcc happens to come first in the linker scope. As it turns out, the order is not for us to control, therefore the interposition may not always work and our JIT generated functions may not get their unwind information found at exception throwing time. That results in the program aborting with an uncaught exception. The proposed solution of replacing the interposition approach is two-fold: (1) Go back to calling __register_frame explicitly, but only for functions that exception _may_ pass through. In addition the performance of scalability of the objects registered with __register_frame is a known issue upstream, as the LLVM JIT also triggers the issue. It is being tracked at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56460 (2) Instead of registering one FDE per function, we can theoretically register one FDE for _all_ JIT generate functions, because they all use the same stack layout that has exactly the same unwinding requirements from any function call site. Since we can't guarantee the presence of all JIT generated code within the same contiguous memory area, we can at least do it per executable memory allocation chunk (page size). One chunk can contain many functions. This patch implements part (2) by moving the per-function unwind info straight to into the executable memory chunk and registering the entire chunk (page) with libgcc. This also separates the regexp JIT executable memory from regular functions, because only for the memory of the latter we need to register unwind info. Change-Id: Ic4d1978686463c6d319436c9083e4d7cf0409829 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Suppress unused parameter warning.Erik Verbruggen2013-04-241-0/+2
| | | | | Change-Id: I1dcc3f2c5ee85f3c21035e5c93188c841c727727 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Rename QQmlJS::VM namespace to QV4Lars Knoll2013-04-191-5/+5
| | | | | | | Simplifies writing code against it (less stuff to type). Change-Id: I8ac03ca2519375a204a3245e82c4be4cf1e793eb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* iOS: Don't enable PROT_WRITE and PROT_EXEC at the same timeTor Arne Vestbø2013-04-171-2/+15
| | | | | | | | We define ENABLE_ASSEMBLER_WX_EXCLUSIVE, which we use to limit the page flags to either RW or RX. Change-Id: I253648ea98610438a533c7a7ccbf5c27c3b8230a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix compilation with built-in v4vm JS engineSimon Hausmann2013-04-151-1/+1
| | | | | Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix memory allocation of executable codeSimon Hausmann2013-04-011-20/+17
| | | | | | | | | | | | | | Previously we allocated at least one page for each compiled function, even if it required less bytes (common). That causes excessive memory usages for large scripts or long running scripts with frequent eval usage. This patch introduces a simple allocator that allocates also on page granularity from the system but allocates the remaining space in the pages in sub-sequent calls. It is optimized to scale with the number of requests and also return pages to the system as soon as possible. Change-Id: I0751a8094afe97e94b5f44c6a691a679ecdb1df0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make ExecutableAllocator compile on WindowsSimon Hausmann2013-02-091-0/+17
| | | | | | | Use VirtualAlloc and friends instead of mmap. Change-Id: I52a90cebb111cf923d86ce6a821717dc7e02ad85 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Centralize code to determine system page sizeSimon Hausmann2013-02-091-2/+3
| | | | | | | | Use the existing WTF::pageSize() instead of calling sysconf ourselves. Change-Id: If68c793898253a239e13070e3454653474f61790 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Say hello to QtV4 module.Jędrzej Nowacki2013-01-301-0/+105
Change-Id: I507cd5707b7d7223a0d901cf939896fb2649b684 Reviewed-by: Lars Knoll <lars.knoll@digia.com>