dolphin/Source
Bram Speeckaert 2580837c60 JitArm64: Optimize divwux
When the divisor is a constant value, we can emit more efficient code.
For powers of two, we can use bit shifts. For other values, we can
instead use a multiplication by magic constant method.

- Example 1 - Division by 16 (power of two)
Before:
mov    w24, #0x10                ; =16
udiv   w27, w25, w24

After:
lsr    w27, w25, #4

- Example 2 - Division by 10 (fast)
Before:
mov    w25, #0xa                 ; =10
udiv   w27, w26, w25

After:
mov    w27, #0xcccd              ; =52429
movk   w27, #0xcccc, lsl #16
umull  x27, w26, w27
lsr    x27, x27, #35

- Example 3 - Division by 127 (slow)
Before:
mov    w26, #0x7f                ; =127
udiv   w27, w27, w26

After:
mov    w26, #0x408               ; =1032
movk   w26, #0x8102, lsl #16
umaddl x27, w27, w26, x26
lsr    x27, x27, #38
2024-03-23 20:13:15 +01:00
..
Android Merge pull request #12606 from mitaclaw/state-global-system 2024-03-22 04:27:12 +01:00
Core JitArm64: Optimize divwux 2024-03-23 20:13:15 +01:00
DSPSpy
DSPTool
PCH bump minimum VS version to 17.6 2023-05-16 20:21:36 -07:00
UnitTests DivUtils: Add unsigned division magic function 2024-03-23 20:13:15 +01:00
VSProps VSProps: Set VcpkgEnabled to false 2024-03-13 16:37:18 +01:00
.clang-format
CMakeLists.txt CMakeLists: Add Clang's Specific WShadow Diagnostics 2024-03-09 15:34:39 -08:00
dolphin-emu.sln Externals: add tinygltf, a library used to load or save GLTF mesh files 2024-02-11 13:26:39 -06:00