29 Commits

Author SHA1 Message Date
Elad 5bbce42adc MacOS: Do not leak MAP_JIT on utils::memory_decommit 2026-07-01 19:31:41 +03:00
Elad 9dc9730898 vm: Make vm::g_exec_addr not use MAP_JIT 2026-07-01 19:31:41 +03:00
Megamouse e5cdae8c5a Use std::string_view in cpu code 2026-06-16 12:07:57 +02:00
Rad0van d25972e196 JIT/AArch64: advertise +i8mm to the LLVM target machine
The PPU/SPU recompilers emit i8mm intrinsics (ummla/smmla, used by the
SPU GBB/GBH gather paths) gated on utils::has_i8mm(). The JIT's MAttrs
list mirrored dotprod/sha3/sve from HWCAP but never added i8mm, and the
resolved -mcpu on Apple silicon is the cortex-a78 fallback (no i8mm), so
the backend aborted with "Cannot select: intrinsic %llvm.aarch64.neon.ummla"
on every game. Mirror i8mm into MAttrs like the other features.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
(cherry picked from commit 52d121fee79cc569c9ac273852edd0e493ae51fc)
2026-06-06 18:34:38 +03:00
Malcolm a87d175295 SPU LLVM: Retry ARM64 TBL2 register scavenger failures
- Some SPU programs inexplicably fail to compile when TBL2/TBX2 are used.
- As an insane workaround, first try to compile with TBL2/TBX2, if LLVM crashes while compiling, try to compile the same program without TBL2/TBX2.
2026-05-27 02:46:11 +03:00
Malcolm b2469039af ARM64: Detect some arm features and let LLVM know if they are or aren't present via attributes
- On x86, LLVM has robust detection for the CPU name. If a CPU like skylake has AVX disabled, it will fall back to something without AVX (nehalem)
- On ARM, detection is not as robust. For instance, on my snapdragon 8 gen 2, it assumes that we have SVE support, as the cortex-x3 supports SVE.
- If an ARM cpu is paired with other cpus from another generation which doesn't support the same instructions as the cortex-x3, or if the cortex-x3 just has SVE disabled for no apparant reason (in the case of the snapdragon 8 gen 2)
- We need to actually detect that ourselves.
- Beyond SVE also detect support for some instructions that might be useful SPU LLVM when optimized with intrinsics.
2026-02-11 08:19:59 +02:00
Marin Baron 41a122a266 [Build] Explicit Triple with LLVM 21.1.0 2025-10-15 20:09:21 +02:00
DH cd840ef70a LLVM JIT: do not produce broken binaries on crash 2025-03-30 08:18:09 +03:00
DH 2ebf257f84 vm: removed c_page_size, it cannot be used by globals 2025-03-10 21:09:27 +01:00
DH 94f52d6dc0 android: jit: teach fallback_cpu_detection provide meaningful results for aarch64 2025-03-10 21:09:27 +01:00
Megamouse 3187dc816e Fix some warnings 2025-02-02 17:06:39 +01:00
Megamouse 67703b49d8 Update LLVM to 18.1.8 2025-01-25 18:15:13 +01:00
Elad 81d0dd686b LLVM: Add explicit resource-freeing at emulation stop 2025-01-25 12:47:44 +02:00
Elad 9d5b75bb7a LLVM: Slice PPU executable memory 2025-01-25 12:47:44 +02:00
Elad 64c53fcc61 LLVM: Install error reporting handler 2025-01-25 12:47:44 +02:00
RipleyTom 36da83592a Improve AMD cpu detection 2024-10-07 05:36:19 +02:00
kd-11 82f97d33d1 aarch64: Correctly implement the null function trap 2024-09-25 15:48:36 +03:00
kd-11 4f97ea8da7 macos - Fix crash when running native arm64 LLVM 2024-08-25 22:04:45 +03:00
Darkhost1999 3970b7b754 Class "llvm:StringRef" has no member 'Startswith' (#15898) 2024-08-08 21:40:52 +02:00
kd-11 0be1c41e63 Improve AMD CPU detection 2024-08-03 21:35:10 +03:00
kd-11 c8e81a2dad Return zen4 for zen5+ until LLVM upgrade 2024-08-03 21:35:10 +03:00
kd-11 dd708166aa Improve intel and apple detection 2024-08-03 21:35:10 +03:00
kd-11 3e7c1e207d Add fallback CPU detection when llvm is not aware of the CPU model 2024-08-03 21:35:10 +03:00
Elad Ashkenazi b639599ade reduce logging 2024-07-28 12:36:42 +03:00
Elad Ashkenazi 26b21ed031 LLVM: Prevent crash on disk space shortage 2024-05-30 11:41:24 +03:00
Elad Ashkenazi c556322fc5 LLVM: Fix nullptr deref when accessing broken cache files 2024-05-30 11:41:24 +03:00
oltolm c40826c140 llvm: update to 18 2024-03-28 08:45:20 +01:00
oltolm 0ae1578dce split JIT.cpp and SPURecompiler.cpp 2024-01-14 17:21:39 +01:00
oltolm 2039b85be3 prepare split 2024-01-14 17:21:39 +01:00