aboutsummaryrefslogtreecommitdiffstats
path: root/src/3rdparty/masm/stubs
Commit message (Collapse)AuthorAgeFilesLines
* 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 symbol clash with QtScript when linking staticallyVladyslav Brovko2017-09-071-0/+5
| | | | | | Task-number: QTBUG-63050 Change-Id: I18c8cfae3cc4d8a6d2c82515541693b7b5194f76 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* 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>
* Merge remote-tracking branch 'origin/5.7' into devAndy Nichols2016-04-053-4/+7
|\ | | | | | | Change-Id: I57b06e2e98beb010a56dd0593d93e078ecf76eea
| * Remove dummy implementation for Pass*Ptr operator=().Rolland Dudemaine2016-04-042-4/+3
| | | | | | | | | | | | | | | | This resolves a lot of warnings when building with the GHS toolchain. Change-Id: I061dac0bf42f6a8158afe8eee9c898e8f7ee4dd7 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * 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>
* | Remove Windows CE.Friedemann Kleint2016-03-101-53/+0
|/ | | | | | | | Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses. Task-number: QTBUG-51673 Change-Id: I33ab74f0c2ce9086c3610c5fa727f281197b6b55 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Updated license headersJani Heikkinen2016-01-1921-294/+420
| | | | | | | | | | | 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>
* V4: add Aarch64/ARM64 support.Erik Verbruggen2016-01-191-0/+7
| | | | | | | | | | This uses the JavaScriptCore assembler rev. 195098. It is tested on iOS (for which it is disabled, as it only allows marking pages as executable when running from Xcode). Testing on Linux will be done when hardware arrives. Change-Id: I650e15fec03c27d4b326a2d70863a89b85cfc5c3 Reviewed-by: Simon Hausmann <simon.hausmann@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>
* QML: Sanitize reading environment variables.Friedemann Kleint2015-10-221-1/+1
| | | | | | | | | | | Where possible, use qEnvironmentVariableIsSet()/ qEnvironmentVariableIsEmpty() instead of checking on the return value of qgetenv(). Where the value is required, add a check using one of qEnvironmentVariableIsSet()/Empty(). Change-Id: Ia8b7534e6f5165bd8a6b4e63ccc139c42dd03056 Reviewed-by: Lars Knoll <lars.knoll@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-1221-147/+147
| | | | | | | | | 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>
* QML 3rdparty: revert unnecessary change.Erik Verbruggen2015-01-122-4/+4
| | | | | | | | It is the change to DataLog.h, which in turn forces the other changes in order to match types. Change-Id: Ie17e7efbd6a4d380a3b7383b0fd0243c6f68d0d5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2521-399/+231
| | | | | | | | | - 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>
* V4 JIT: enable disassembler on windows.Erik Verbruggen2014-03-032-2/+9
| | | | | Change-Id: I55a2a96a1a774c79cc2146c6b47d441fede1d102 Reviewed-by: Simon Hausmann <simon.hausmann@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>
* Implement WTFReportAssertionFailureSimon Hausmann2013-10-171-1/+2
| | | | | | | At least do a printf with the failure details, to make debugging easier. Change-Id: I092d31e3408cd0a651c6dd96b5fd94adf4abe3a7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* V4: changed environment variable SHOW_CODE.Erik Verbruggen2013-09-301-1/+1
| | | | | | | | | Use QV4_SHOW_ASM for the generated assembly from the JIT, and use QV4_SHOW_IR to get dumps of the IR. Change-Id: Id85d3d6c87b47088c312475a7c737d54c58c7791 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@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>
* wince: vsnprintf is not available, use qvsnprintfSergio Martins2013-08-271-2/+3
| | | | | | | Change-Id: I42c87b2c319ce5b530ac5dc673edc99b067fafd7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
* Fix compilation with MSVC 2008 (and prospective Windows CE build fix)Simon Hausmann2013-08-221-0/+55
| | | | | | | | | | | | | | | | | * Only 2010 and newer ship stdint.h, so for 2008 we have to provide a little stdint.h compat header, for some of the third-party code we import. Our own Qt code this patch changes to use quint* types instead. * Include math.h and float.h for some math functions. * disable the JIT on Windows CE for now. * Change use of intptr_t to qintptr in Qt code. intptr_t is in inttypes.h, except that with VS 2008 it is indirectly available through stdio.h. Let's avoid the mess and just use the qt type, that's always available. Change-Id: I19055edd89e0a6b147d9edbb3b711798ed3c05a5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix module name (QtQml) in the license header under src/3rdpartySergio Ahumada2013-06-2620-40/+40
| | | | | | | | 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 failing assertion with MSVC in debug builds in various testsSimon Hausmann2013-06-261-18/+5
| | | | | | | | | | | | | | We re-implemented Vector::begin() and end() by means of dereferencing the return value from std::begin() and then taking the address of it. That causes a failing assertion in MSVC's STL (rightly so!). We did this only to avoid modifying the original YarrJIT.cpp code. This patch instead simplifies our Vector.h stub again and just fixes the two small occurrences in YarrJIT.cpp where it expects vector->begin() to return a pointer instead of an iterator. Change-Id: I2ad137be91ea969ccb310333dffa8d98e5825f8f 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-192-12/+6
| | | | | | | Simplifies writing code against it (less stuff to type). Change-Id: I8ac03ca2519375a204a3245e82c4be4cf1e793eb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use 'template' keyword to treat 'vector' as a dependent template nameTor Arne Vestbø2013-04-171-1/+1
| | | | | Change-Id: I736c0ef531eb302276dc763584da75e44579e643 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>
* Don't use std::vector::shrink_to_fit(), it's C++11, and not enabled on iOSTor Arne Vestbø2013-04-171-1/+1
| | | | | Change-Id: I547df5bcf09837ebac9d64d66a4171ed87627b1a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Speed up regular expression matchingSimon Hausmann2013-04-163-6/+90
| | | | | | | | Use the Yarr JIT back-end if possible. Speeds up the RegExp v8 benchmark by a factor of 3. Change-Id: I7c6c8086d1d07dcd13400e3cc8bbae408ea67198 Reviewed-by: Lars Knoll <lars.knoll@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 build of the rest of v4vm against WTF/JSC updateSimon Hausmann2013-04-122-1/+14
| | | | | | | | | * Add missing functions to our WTF stubs * Some of the math functions wrapped with MathExtras.h are back in the std:: namespace they belong to Change-Id: I9da43e8344ab8c95edc8db19f44ccdbd91b4ac70 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix memory allocation of executable codeSimon Hausmann2013-04-012-20/+26
| | | | | | | | | | | | | | 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>
* Simplify UChar stub hackSimon Hausmann2013-02-091-1/+1
| | | | | | | | | Don't use uint16_t, because it's not available with all MSVC versions. Since this is just a stub it's okay to simply write out the type. Change-Id: I9220c9476a7263377b723e46e4f49892908bd53c 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-3020-0/+1342
Change-Id: I507cd5707b7d7223a0d901cf939896fb2649b684 Reviewed-by: Lars Knoll <lars.knoll@digia.com>