| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The generated code for jump-on-strict-not-equal-undefined used the
same logic (but with inverted conditions) as the equal case. For
equality, one can jump to else if the value parts are not the same.
So, for not-equal, if the value parts are the same, it would jump
to the else block if they are the same. Meaning, an encoded int
value of 0 (which is strict-not-equal to undefined) would end up
being evaluated as equal.
Task-number: QTBUG-66832
Change-Id: I5c6b8e9b11be53ae21a7164e0a1e0cbfd204f401
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
We can't use QV4_USE_64_BIT_VALUE_ENCODING for deciding how generate
code for checking if the tag of a value contains the necessary mask to
detect doubles.
Change-Id: Id5a5c1b136313aa4dfd2c997898e97cd4ebaeb83
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both MIPS and X86-64 on Windows reserve space for four registers on the
stack, that the called function may use to spill the parameters passed
in registers.
This needs to be handled without #ifdefs in order to support
cross-compilation and from the looks of it it was also wrong on MIPS.
Change-Id: If65a6a0f6f64b8536703d32e7678e30ad807f7c8
Reviewed-by: Julien Brianceau <jbriance@cisco.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
qv4isel_masm.cpp:285:44: warning: instantiation of variable 'QV4::JIT::Assembler<QV4::JIT::AssemblerTargetConfiguration<JSC::MacroAssemblerX86_64,
QV4::JIT::TargetOperatingSystemSpecialization::NoOperatingSystemSpecialization>>::Void' required here, but no definition is available [-Wundefined-var-template]
Depending on qv4assembler.cpp instantiating the same template that
q4isel_masm.pp required is fragile. So move the definition to the
header, next to the class.
Change-Id: I27b55fdf514247549455fffd14b178ec9d4b508d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
QV4::Primitive is using host value encoding, which can differ from the
target. The source of QV4::Primitive in the code generator is usually
IR::Const, transformed via convertToValue(). That function becomes a
template that converts to a simple target primitive type.
Change-Id: If028aea9551d77d81eec306f60fd995c25b76710
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our two value encodings use different masks for the upper 4 bytes.
Depending on the target architecture we must use different values when
generating code that uses these masks.
This patch replaces the #ifdef'ed ValueTypeInternal_* enum values with
two C++11 scoped enums that allows for the co-existence of both
throughout the code base as well as selective use in the code
generators.
Change-Id: I380c8c28b84df2874cca521b78bfe7f9388ed228
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Replace the use of size(void*) with target assembler specific values for
the pointer size, when calculating offsets into the stack for
poke/peek/push/pop and placing arguments onto the stack before calling
functions.
Change-Id: I3aff540f0083967e75b61e0c29dbeb4d9ecfa433
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: Ie8d0c7b360ff120f381e33439037cf7b01257456
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the Runtime function pointer array into EngineBase so that
we can eliminate the last use of qOffsetOf.
For improved cache locality the memory manager point is now also
located in the EngineBase.
Change-Id: I0b3cf44c726aa4fb8db1206cc414a56c2f522a84
Task-number: QTBUG-58666
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure the offsets we're taking from ExecutionContext members in the JIT
code generator can be translated from host architecture sizes to target
architecture, using assertions and a memory layout that we already have
in the dev branch with commit 4de7e48ab160dacc7a09360e80264eac4945a8f4.
Task-number: QTBUG-58666
Change-Id: I26cdbd1ddb995b116624fab16f7caba5d21c13b5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current way of encoding the offsetof() of the method_ members in
QV4::Runtime is not portable when cross-compiling from a 64-bit host
(where the offsetof would be calculated on) to a 32-bit target (where
the offset would be different), or vice versa. In preparation for making
this work, this patch first replaces the direct use of the run-time
members with use through a void * and an enum for indexing. This gives
us some type-safety in some places and will also allow for a translation
of the pointer offset from host pointer indexing to target pointer
indexes.
As a bonus we can avoid going through the engine->runtime indirection in
the interpreter altogether and call the static methods right away.
Task-number: QTBUG-58666
Change-Id: I3cd6459523923a9719408317fa729bca19c2bf3c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The offsets of members encoded in JIT generated code differ between
32-bit and 64-bit architectures. This patch moves some of the
ExecutionEngine members into a separate standard-layout EngineBase class
(in line with the same class in commit
2a554434a571dcefd26cf10ef8c5ae8b3b7d66db and subject to merging). By
ensuring that the members are stored at pointer intervals, we can
translate from host pointer size to target when generating the code.
Task-number: QTBUG-58666
Change-Id: I1c38a7da059826848b80fd9972ed073214501386
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
When a callee saved register is available on 64bit platforms, put the
Value::NaNEncodeMask in it. This saves one instruction for every load
or store of doubles.
Change-Id: I57262988610996e6a912e97d3026d4bb8ce26fe8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
| |
The GOT register restoring logic needs to be done via TargetPLatform
members instead of plain #ifdefs.
Task-number: QTBUG-58569
Change-Id: If00d3f92558361ad5dcb20c3ff7eff78d31d75d3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
These macros do not apply anymore when cross-compiling. This patch
replaces the macro use for locals JS stack initialization with register
size dependent operations as well as when loading the this object into a
stack slot.
Change-Id: Ia986f6dbfa37c6d6ce2f1de6253e7008e4aa87dd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I75db85fbd601d4790a3cb9af483474a976d00e86
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
Use templates to perform the platform encoding dependent way of
comparing a given value against undefined.
Change-Id: I7e7726455023200bd74e62d2dbc4e2c2908d9e64
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
Use templates to encode the various platform dependent ways of encoding
the return values.
Change-Id: Icb481a75924da7d78396ff1c95474dc9c29ca494
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
Use templates to abstract the two different ways of making a QV4::Value
hold the address of a managed, in this case to a runtime string.
Change-Id: Ibe9ae10fdcef68dbfc7c61fbb3ec8b3a1d50f1a2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the use of TrustedImmPtr(0) with target register size dependent
template functions, as TrustedImmPtr is forbidden for non-zero values
(non-relocatable code) and for zero still ends up using functions in the
underlying assembler that are behind #ifdefs.
Similarly the use of xorPtr does not compile with ARMv7, so use the
zeroRegister abstraction instead.
Change-Id: I84c1792847bd51d1cf5f305c3589517583b816f3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I37d2a2d74e150b92f5a338d799def337dcb8abd9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
We can replace that code with a compile-time if statement where the
compiler will throw away the unused part.
Change-Id: I827633a14b3025bb7acaef6f85a52682d6df3da1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
Move it into JITAssembler for future use there. All it requires is
making the assembler to use a macro parameter.
Change-Id: I204e91d1b24eb02e476d8f4a43f3cd1665df0560
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I779fff3a925015c34162542648b8074692c0b974
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I33155d8071d03250edefaf93f769c9629a5f827f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: Iecc92f86a7314e4674f140251467c0654451abef
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I4660bbf0dde4aef15be07ea61c1e0c181ec696be
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I56159645dd896eff0874129db6c0d53241ad901e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Use RegisterSizeDependentAssembler for the 64- and 32-bit
implementations of using the return value register(s).
The fallback of returning the double via the stack is removed as it was
not used in any of our JIT supported target architectures AFAIK.
Change-Id: I27194edfe6676992d17bd09cc50ea7da4e339c22
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
...by moving the body into the 8-byte register operations class.
Change-Id: I386c1af711935f08f48cb65adb2f1f4fec64322d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: If8e566f31cf036459eba935fadb31359f436454a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
| |
Change-Id: I69b74e01dcffe82caafb7aa8495b3036afc2b933
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This completes the foundation of being able to include all assembler
backends in one build. The next steps will be template specialization
instead of #ifdefs for target architecture dependent instruction
selection.
Change-Id: I048a5e582d5993dc422577981e32e7cd93b9f0f8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
| |
We are going to need multiple variants of it in the future.
Change-Id: Ieeec833f911b4cdeb2de4e9afb982b90424cd157
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: If6edb7ed0fac51e93b218eb45c01274a87b9e904
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
In the future we're going to need different specializations of that
depending on the target platform chosen at run-time.
Change-Id: I2ed6f41c3eb0487d83afee01f81b78361678dfd9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
Similar to the previous change, minimize the dependency on the
JSC::MacroAssembler interface, to allow changing it more easily in the
future.
Change-Id: I3ab5a4c96b4d3e0a341697401fafe994be0406d0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I31d440d6dc3f42ba33ae42af7ba42a6d045a02fb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
The QV4::Assembler does not need a reference to the ISel that uses the
assembler, a reference to the JS unit generator for string registration
is sufficient.
Change-Id: I9e929e4d0aecbf0144296f85cb8d208296f28003
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
examples/quick/quickwidgets/quickwidget/main.cpp
src/qml/jsruntime/qv4jsonobject.cpp
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/qml/jsruntime/qv4qobjectwrapper_p.h
src/qml/qml/qqmlengine.cpp
src/qml/qml/qqmlpropertycache.cpp
src/qml/qml/qqmlpropertycache_p.h
src/quick/items/qquickanimatedsprite.cpp
src/quick/items/qquickitem.cpp
src/quick/items/qquickitem.h
src/quick/items/qquickitem_p.h
src/quick/items/qquickview_p.h
src/quick/scenegraph/qsgcontext.cpp
src/quick/scenegraph/qsgdefaultrendercontext.cpp
Change-Id: I172c6fbff97208f21ed4c8b6db3d1747a889f22b
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
tests/auto/quick/qquicktext/tst_qquicktext.cpp
Change-Id: I241cd418bb7e7b95e0a0a2ee4c465d48be2a5582
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This allows for the OS to use 49 address bits. It also maps JS Undefined
to the C++ nullptr on 64bit.
Task-number: QTBUG-54822
Change-Id: I7cc90620f499be1506a61aac77d72d067308838c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
All keyed on basic block index.
Change-Id: I98d46a36896d4b1ab45882ea9f38d0539ffb319e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
After moving all runtime functions into the Runtime class and doing
indirect function calls, the code generation would always emit code
to check for an exception after a call. This is problematic for methods
that do not throw, but might be called when an exception is thrown. I.e.
in a finally block. This is especially problematic for methods like
popScope, the very first runtime method that is called in a finally
block. The result was that after popScope, execution was passed over to
the exception handler block for that finally block (meaning: the body
of the finally block was never executed).
The fix is to declare an enumerator in an anonymous enum for each
runtime method that indicates if an exception check is needed. The
existing ExceptionCheck templates are used to set the value.
Change-Id: I5bd8bcf2a92acabf2a33b3764447de6cc364bba9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I3399f1ce4abb8cb4b78c5a7a218321f308e916fb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
On 32-bit architectures we were encoding the absolute address of generated
constants in memory into the load instruction. In order to make the code
reloctable, this patch changes the JIT over to use the constant table in the
compilation unit. This means two additional loads per constant. On
architectures that support instruction pointer relative addressing, we can try
to fix this in the future (arm32 for example).
Change-Id: I8ed7aa7c67711696d6c46c72b3b642d610ff2cbc
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
INT_MIN is negative.
qv4assembler_p.h(108): warning #68: integer conversion resulted in a
change of sign
Change-Id: I149e0540c00745fe8119fffd1463d31acd727690
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This remains hidden behind the QML_DISK_CACHE flag until all backends
support it and the verification code is in place.
Change-Id: Ic77c64e20a2dc4c43473c47640e09f8070237e85
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use of TrustedImmPtr means the code becomes unrelocatable. Replace the usage
with constant table use. This does not eliminate the absolute addressing right
now as the constant table still uses patches, but that needs to be ported
separately anyway.
Change-Id: I469520fba9c9068f041157e39bc57552558e3355
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Some internal API in the JIT that explicitly uses TrustedImmPtr is not used
anymore. To prevent future accidental usage and thus introduce non-relocatable
code, let's remove the convenience API.
Change-Id: I7f1ed23808449991b5765467845c66fe116ca8a0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|