rpcsx/rpcs3
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
..
Crypto initial cellGameThemeInstall and cellGameThemeInstallFromBuffer 2022-06-07 07:37:30 +02:00
Emu PPU LLVM arm64+macOS port (#12115) 2022-06-14 15:28:38 +03:00
Icons Qt: Use svg instead of png 2021-10-28 21:01:27 +02:00
Input DS3: fix other report size check. 2022-06-10 18:46:12 +02:00
Loader PSF: move resolution flags to enum 2022-06-02 13:12:04 +02:00
qt/etc Qt: use config to load translation file on startup 2020-02-06 17:41:50 +01:00
rpcs3qt rsx: Improve Null Renderer 2022-06-12 20:54:42 +03:00
util PPU LLVM arm64+macOS port (#12115) 2022-06-14 15:28:38 +03:00
CMakeLists.txt PPU LLVM arm64+macOS port (#12115) 2022-06-14 15:28:38 +03:00
Cubeb.vcxproj soundtouch: fix debug build 2022-04-01 02:24:27 +02:00
Cubeb.vcxproj.filters Audio backend improvements 2021-11-24 19:41:05 +01:00
display_sleep_control.cpp Log cpu usage periodically 2022-03-16 19:42:06 +01:00
display_sleep_control.h Remove BOM markers 2020-12-06 15:30:12 +03:00
emucore.vcxproj gl: Implement fast texture readback for D24X8 and RGBA8/BGRA8 2022-06-03 11:54:09 +03:00
emucore.vcxproj.filters gl: Implement fast texture readback for D24X8 and RGBA8/BGRA8 2022-06-03 11:54:09 +03:00
frame_icon.xpm
git-version.cmake CD: Fix experimental build warning for Travis 2020-03-27 23:00:22 +03:00
GLGSRender.vcxproj gl: Refactor image and command-context handling 2022-06-04 14:02:33 +03:00
GLGSRender.vcxproj.filters gl: Refactor image and command-context handling 2022-06-04 14:02:33 +03:00
headless_application.cpp Fix some enumeration warnings 2022-03-03 08:25:46 +01:00
headless_application.h Rename CallAfter to CallFromMainThread 2022-02-07 19:42:08 +01:00
main.cpp Qt: Misc text updates (#12110) 2022-05-30 19:35:41 +02:00
main_application.cpp Revert recent file system changes (#11370) 2022-01-13 07:24:04 +03:00
main_application.h Emu: some cleanup 2021-04-09 21:03:49 +02:00
resource.h
resources.qrc Qt: Use svg instead of png 2021-10-28 21:01:27 +02:00
rpcs3.desktop Add startupWMClass to linux .desktop Fixes #10685 2021-08-09 09:08:44 +02:00
rpcs3.icns Round macOS icon 2022-02-27 11:16:50 +01:00
rpcs3.ico upgrade icons to a modern design 2021-03-29 22:24:40 +03:00
rpcs3.metainfo.xml metainfo: move away from deprecated appdata 2021-05-19 19:55:58 +03:00
rpcs3.plist.in Set min macOS version to 11.6 2022-02-27 11:16:50 +01:00
rpcs3.png upgrade icons to a modern design 2021-03-29 22:24:40 +03:00
rpcs3.rc
rpcs3.svg upgrade icons to a modern design 2021-03-29 22:24:40 +03:00
rpcs3.vcxproj Qt: add new vfs usb tab 2022-05-10 19:39:35 +02:00
rpcs3.vcxproj.filters Qt: add new vfs usb tab 2022-05-10 19:39:35 +02:00
rpcs3_version.cpp rpcs3_version: Bump to 0.0.22 2022-05-01 15:23:47 +02:00
rpcs3_version.h Qt: unify version displays 2022-04-14 23:16:40 +02:00
stb_image.cpp stblib: disable another unsupported clang warning (#10244) 2021-05-07 01:26:21 +01:00
stdafx.cpp shared_ptr.hpp: don't use fake objects 2021-05-30 15:07:17 +03:00
stdafx.h types.hpp: implement smin, smax, amin, amax 2021-05-22 12:10:57 +03:00
VKGSRender.vcxproj vk: Move renderer types to a separate file 2022-02-21 23:58:01 +03:00
VKGSRender.vcxproj.filters vk: Move renderer types to a separate file 2022-02-21 23:58:01 +03:00
windows.qrc
XAudio.vcxproj BUILD: Move buildfiles & improved prop includes (#10251) 2021-05-15 20:20:12 +02:00
XAudio.vcxproj.filters Replace XAudio2 implementation with an unified Xaudio2Redist 2020-02-20 23:33:09 +03:00