This commit replaces the old instruction sequence with one that is
considerably shorter. Main ideas are as follows:
- Use AND with constant mask to isolate the needed bits.
- Use ORR + LSL/LSR to shirt the bits into position and combine in one
instruction where possible.
- Red and alpha are already sequential, so don't need to wait for the
byteswap.
- Do the expansion from 6 to 8 bits at the end for all 4 components
in one step.
Before:
ldur w14, [x0]
rev w14, w14
ubfx w15, w14, #0, #6
orr w15, wzr, w15, lsl #2
orr w15, w15, w15, lsr #6
orr w16, wzr, w15, lsl #24
ubfx w15, w14, #6, #6
orr w15, wzr, w15, lsl #2
orr w15, w15, w15, lsr #6
orr w16, w16, w15, lsl #16
ubfx w15, w14, #12, #6
orr w15, wzr, w15, lsl #2
orr w15, w15, w15, lsr #6
orr w16, w16, w15, lsl #8
ubfx w15, w14, #18, #6
orr w16, w16, w15, lsl #2
orr w16, w16, w15, lsr #4
str w16, [x1, #0xc]
After:
ldur w14, [x0]
rev w15, w14
and w16, w14, #0xfc00
and w14, w14, #0x3f000000
lsr w16, w16, #8
orr w16, w16, w14, lsl #2
and w14, w15, #0xfc0
and w15, w15, #0x3f000
orr w15, w15, w14, lsl #14
orr w16, w16, w15, lsr #2
and w15, w16, #0xc0c0c0c0
orr w16, w16, w15, lsr #6
str w16, [x1, #0xc]
This replaces the old instruction sequence with one that is considerably
shorter. Main ideas are as follows:
- Use AND with constant mask to isolate the needed bits.
- Use ORR + LSL/LSR to shift the bits into position and combine in one
instruction where possible.
- Red and blue are already sequential, so don't need to wait for the
byteswap. This is especially handy for red, where the bits are
already where they need to be.
- Red and blue can be expanded from 5 to 8 bits together.
Before:
ldurh w14, [x0, #0x1]
rev16 w14, w14
and w15, w14, #0x1f
orr w15, wzr, w15, lsl #3
orr w15, w15, w15, lsr #5
orr w16, wzr, w15, lsl #16
ubfx w15, w14, #5, #6
orr w15, wzr, w15, lsl #2
orr w15, w15, w15, lsr #6
orr w16, w16, w15, lsl #8
ubfx w15, w14, #11, #5
orr w16, w16, w15, lsl #3
orr w16, w16, w15, lsr #2
orr w16, w16, #0xff000000
str w16, [x1, #0xc]
After:
ldurh w14, [x0, #0x1]
rev16 w15, w14
bfi w14, w14, #11, #13
and w16, w14, #0xf800f8
and w14, w14, #0xe000e0
orr w16, w16, #0xff000000
orr w16, w16, w14, lsr #5
and w14, w15, #0x7e0
and w15, w15, #0x600
orr w14, w14, w15, lsr #6
orr w16, w16, w14, lsl #5
str w16, [x1, #0xc]
Qt 6.2 has been de facto required since
afa6e26e5d added a call to
QPixmap::deviceIndependentSize which was introduced in that Qt version.
Qt 6.2 was released 5 years ago and we've required 6.2+ for over 2
years, so let's make that requirement explicit in CMakeLists.txt instead
of having an apparently random compile error if anyone happens to try
building with an older Qt version.
If an unconditional branch is not the last instruction of the block, assuming that this means that the branch must have been followed is an unsafe assumption on how the analyzer works that may not hold true in the future.
As a bonus: JitArm64, unlike x86, didn't skip followed `bcx`s. Now it does.
libc++ 23 enforces the dependency from certain stdlib.
In this case, we need <vector> here or build will fail.
Signed-off-by: WalterCool <waltercool@slash.cl>