| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
V4's baseline JIT uses some old JavaScriptCore code to
optimize functions.
As part of the offering, it is possible to use a disassembler, if
enabled, to peek into the code that the JIT has generated for a
function.
For i386 and x86_64 udis86 is used, of which we bundle a very old
version.
To build and make use of udis86 it is necessary to generate some code
running some bundled python scripts.
The scripts are still written for a python2 target, which has long been
sunsetted, making the scripts difficult to run on more modern systems.
To allow the scripts to be run more easily, some modifications were made
to support more modern pythons versions.
In particular, print statements were modified to print functions.
Furthermore, usages of the division operator("/") were modified to the
integer division operator("//"), as the meaning of "/" was changed to
non-integer division between python 2 and 3.
Finally, a usage of the sort method was modified with self assignment to
a `sorted()` value, due to python 3 not returning a list anymore, which
has a sort method, on dict's `items` method.
The changes are expected to mostly be semantically compatible, albeit it
wasn't ascertained whether the behavior of other parts of the script
might have been silently hit when running on a more modern python
version.
Informally, the script was used with a python 3.13 version, and the
generated code was used to disassemble a few jitted function with
success during an unrelated bug investigation.
Change-Id: Ide0bcf4d29a51759f9bb9bd07d940562a8cfcc04
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
| |
Optimize fixed numbers to facilitate subsequent character array expansion
Pick-to: 6.8 6.7 6.5
Change-Id: Ieb3b2ba527a88054594e00ddbf1072cccefb6965
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
When the incoming data is 4, the index defined by this macro has a crash
Log: mips array out of bounds
Pick-to: 6.8 6.7 6.5
Change-Id: I5acff5479f17e55d5731443d08b0915c701968f6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current output would look like this (including the blank lines):
[20191115 12:32:37.378 UTC 0xc47cb8 default: Generated BaselineJIT code for
[20191115 12:32:37.379 UTC 0xc47cb8 default: function expression for source
[20191115 12:32:37.379 UTC 0xc47cb8 default: :
[20191115 12:32:37.379 UTC 0xc47cb8 default: Code at [0x671068d1, 0x671069bd):
[20191115 12:32:37.379 UTC 0xc47cb8 qt.v4.asm: disassembly not available for range 0x671068d1...0x67106997
[20191115 12:32:37.379 UTC 0xc47cb8 qt.v4.asm:
Drop 3 of the newlines to make it not beautiful, but at least not
totally verbose.
Change-Id: I850b7acede33ddbb5f6ab74fd760962ca18988c8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
Add a rudimentary disassembler for mips32 instruction set.
Although few instructions might be missing, the whole set from
MacroAssemblerMIPS should be covered.
Change-Id: I9b1b9b40537b99098ca65036f671651d04fe1ab6
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
| |
|
|
|
| |
Change-Id: I2fee1d9d8c9b6437e6237388f2b0d93243fe601d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
|
|
|
|
|
|
|
| |
Platforms and/or compilers have different opinions on the type of
uint64_t, so with a bit of casting and using the biggest possible
format, the warnings will hopefully disappear.
Change-Id: I1e128eaf8bc53771a517490292f52084046574dd
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not generate constant shifts of 0. We do not use the flags, so it's a
move. On ARM it's actually important not to do this, because lsr/asr
with imm=0 is a special case (shift of 32 bits).
When in the area, also skip generating an and of the second operand with
0x1f. For Intel this is done on the CPU, and for ARM the JSC assembler
will generate it for us.
This patch also updates the ARM disassembler to print the right
immediate values for the shifts.
Change-Id: I7c92c8d899352712c84e5534c48392d75466be0e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
|
|
|
| |
Change-Id: Iba3860ef8ea940b8f232e21e273b0ac83d895882
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
|
|
|
|
|
|
|
|
| |
The previous patch contained the wrong formatting string for 64bit
platforms. Good compilers will warn on this (and fail compiling with
-Werror). Fixed the issue in such a way that we now have static checking
for both 32bit/64bit platforms by the compiler.
Change-Id: Idf4a80d8795605c61ef812426c9984df1ceac4d4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
|
|
|
|
|
|
| |
The addresses were truncated to 32bits, which is a problem on win64,
because JITted code ended up outside that range.
Change-Id: I0d8b92486714340dffe4b4c2de29cf11a929a149
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
|
|
|
|
|
|
| |
Tested on both win32 and win64.
Change-Id: I47755e2da51829e61e1452eaaf84a057224b478b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
|
| |
|
|
|
| |
Change-Id: I55a2a96a1a774c79cc2146c6b47d441fede1d102
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
|
|
|
|
|
| |
Added VADD/VSUB/VLDR/VSTR.
Change-Id: I25fbb338652c3457e15cc9ef17209d35c63fefe5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
|
|
|
|
|
|
| |
This is a special-case instruction, where the immediate needs to be
multiplied by 4.
Change-Id: I86e5ab9d39d65b8eab99fae859969896c6e5630c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
|
|
|
|
|
| |
rt is on position 12. See A8.8.345.
Change-Id: Ibf380b9bda8d2edd603857935d6c92cd89d0f104
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
| |
|
|
|
|
|
|
|
|
| |
Ported the ARM disassembler from upstream trunk. QtQml needs to be configured
with qmake CONFIG+=disassembler and QV4_SHOW_ASM=1 enables the dump at
run-time.
Change-Id: Ia13a98835829fde0d3c5a795cb8f6ef9de951807
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This brings in various bug fixes in the ARM and MIPS assemblers as well as
a Yarr crash fix and performance fix.
This change doesn't compile as-is, but the next change will
apply the modifications necessary to compile. That'll make future updates
easier as it allows for cherry-picking because the modifications are usually
always the same.
Change-Id: Iac32f62c71e8ff908deb41f28f12fbc98c0823e1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
Change-Id: I507cd5707b7d7223a0d901cf939896fb2649b684
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|