1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00
rpcs3/3rdparty
Jeff Guo cefc37a553
PPU LLVM arm64+macOS port (#12115)
* BufferUtils: use naive function pointer on Apple arm64

Use naive function pointer on Apple arm64 because ASLR breaks asmjit.
See BufferUtils.cpp comment for explanation on why this happens and how
to fix if you want to use asmjit.

* build-macos: fix source maps for Mac

Tell Qt not to strip debug symbols when we're in debug or relwithdebinfo
modes.

* LLVM PPU: fix aarch64 on macOS

Force MachO on macOS to fix LLVM being unable to patch relocations
during codegen. Adds Aarch64 NEON intrinsics for x86 intrinsics used by
PPUTranslator/Recompiler.

* virtual memory: use 16k pages on aarch64 macOS

Temporary hack to get things working by using 16k pages instead of 4k
pages in VM emulation.

* PPU/SPU: fix NEON intrinsics and compilation for arm64 macOS

Fixes some intrinsics usage and patches usages of asmjit to properly
emit absolute jmps so ASLR doesn't cause out of bounds rel jumps. Also
patches the SPU recompiler to properly work on arm64 by telling LLVM to
target arm64.

* virtual memory: fix W^X toggles on macOS aarch64

Fixes W^X on macOS aarch64 by setting all JIT mmap'd regions to default
to RW mode. For both SPU and PPU execution threads, when initialization
finishes we toggle to RX mode. This exploits Apple's per-thread setting
for RW/RX to let us be technically compliant with the OS's W^X
    enforcement while not needing to actually separate the memory
    allocated for code/data.

* PPU: implement aarch64 specific functions

Implements ppu_gateway for arm64 and patches LLVM initialization to use
the correct triple. Adds some fixes for macOS W^X JIT restrictions when
entering/exiting JITed code.

* PPU: Mark rpcs3 calls as non-tail

Strictly speaking, rpcs3 JIT -> C++ calls are not tail calls. If you
call a function inside e.g. an L2 syscall, it will clobber LR on arm64
and subtly break returns in emulated code. Only JIT -> JIT "calls"
should be tail.

* macOS/arm64: compatibility fixes

* vm: patch virtual memory for arm64 macOS

Tag mmap calls with MAP_JIT to allow W^X on macOS. Fix mmap calls to
existing mmap'd addresses that were tagged with MAP_JIT on macOS. Fix
memory unmapping on 16K page machines with a hack to mark "unmapped"
pages as RW.

* PPU: remove wrong comment

* PPU: fix a merge regression

* vm: remove 16k page hacks

* PPU: formatting fixes

* PPU: fix arm64 null function assembly

* ppu: clean up arch-specific instructions
2022-06-14 15:28:38 +03:00
..
7z 7z: Update from 19.00 to 21.07 2022-04-24 08:26:26 +02:00
asmjit Initial Linux Aarch64 support 2022-01-15 06:48:04 +03:00
cubeb Minor AArch64 support changes 2022-05-04 16:12:32 +03:00
curl curl: fix cmake 2022-04-24 10:23:17 +02:00
discord-rpc Initial Linux Aarch64 support 2022-01-15 06:48:04 +03:00
FAudio@0b6d5dabbf FAudio: Update from 21.11 to 22.04 2022-04-24 08:26:26 +02:00
ffmpeg@bf019f8c88 Rebase hidapi to 0.11.0 2022-01-02 23:33:19 +01:00
flatbuffers@615616cb55 Update flatbuffers to v2.0.6 2022-04-24 19:43:40 +02:00
GL glext: Update from 2020.04.23 to 2021.04.20 2021-07-14 10:43:16 +01:00
glslang glslang: Update from 11.7.1 to 11.9.0 2022-04-24 08:26:26 +02:00
GPUOpen/include vk: Add basic support for FSR 1.0 2021-08-06 17:18:48 +03:00
hidapi Windows Hotfix: Update hidapi 2022-01-26 22:02:27 +01:00
libpng BUILD: Refactor zlib submodule (#10393) 2021-06-02 07:33:50 +02:00
libusb Update libusb to v1.0.26 2022-04-29 02:04:52 +02:00
MoltenVK PPU LLVM arm64+macOS port (#12115) 2022-06-14 15:28:38 +03:00
OpenAL BUILD: a couple of cmake msvc compile fixes (#10799) 2021-09-11 23:55:53 +02:00
pugixml@dd50fa5b45 pugixml: Update from v1.11.4 to v1.12.1 2022-04-24 08:26:26 +02:00
SoundTouch soundtouch: fix debug build 2022-04-01 02:24:27 +02:00
SPIRV Set up VS environment before calling cmake in glslang and spirv (#10952) 2021-10-02 00:07:58 +01:00
stblib stb_truetype: Update from 1.25 to 1.26 2021-10-21 22:35:23 +02:00
wolfssl WolfSSL: Use a custom UTF-8 aware _stat on Windows 2022-03-21 15:47:27 +01:00
XAudio2Redist XAudio2: Update from 1.2.6 to 1.2.8 2021-10-21 22:35:23 +02:00
xxHash@35b0373c69 Update xxHash to version 0.8.1 2021-11-29 22:12:39 +01:00
yaml-cpp Update yaml-cpp 2021-10-05 20:16:11 +02:00
zlib zlib: Update from v1.2.11 to v1.2.12 2022-04-24 08:26:26 +02:00
CMakeLists.txt build/cmake: unbreak USE_SYSTEM_FLATBUFFERS after bec0b6e8c3 2022-05-26 09:32:52 +02:00
llvm.cmake Minor AArch64 support changes 2022-05-04 16:12:32 +03:00
qt5.cmake Qt: Use svg instead of png 2021-10-28 21:01:27 +02:00
xxhash.vcxproj BUILD: Move buildfiles & improved prop includes (#10251) 2021-05-15 20:20:12 +02:00