Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Lower the ARM version requirement to ARMv8 #16392

Open
stevefan1999-personal opened this issue Dec 11, 2024 · 3 comments
Open

Comments

@stevefan1999-personal
Copy link

stevefan1999-personal commented Dec 11, 2024

Quick summary

We should lower the ARMv8.1 requirement down to just ARMv8 so that it can be more compatible

Details

check_cxx_compiler_flag("-march=armv8.1-a" COMPILER_ARM)
endif()
add_compile_options(-Wall)
add_compile_options(-fno-exceptions)
add_compile_options(-fstack-protector)
if(USE_NATIVE_INSTRUCTIONS AND COMPILER_SUPPORTS_MARCH_NATIVE)
add_compile_options(-march=native)
elseif(COMPILER_ARM)
# This section needs a review. Apple claims armv8.5-a on M-series but doesn't support SVE.
# Note that compared to the rest of the 8.x family, 8.1 is very restrictive and we'll have to bump the requirement in future to get anything meaningful.
if (APPLE)
add_compile_options(-march=armv8.4-a)
else()
add_compile_options(-march=armv8.1-a)

Show that we need at least ARMv8.1 for the architecture. While maybe it is okay if I manually override the compiler setting and build for my Jetson Nano, which unfortunately is a Cortex-A57 and does not support ARMv8.1 but does support ARMv8 (ARMv8.1 support is only starting from Jetson Xavier NX).

I'm also aware that the GPU of Jetson Nano does not have Vulkan support and thus I have to resort back to OpenGL backend but I just want to see if it works first.

@kd-11
Copy link
Contributor

kd-11 commented Dec 11, 2024

Unfortunately armv8 < 8.1 generates very inefficient code especially around atomics which are very heavily used in rpcs3. We cannot ship it as a baseline profile officially.
Rpcs3 being open source means you can just create your own personal branch with the workarounds, there is no need to affect the official releases.

@stevefan1999-personal
Copy link
Author

Unfortunately armv8 < 8.1 generates very inefficient code especially around atomics which are very heavily used in rpcs3. We cannot ship it as a baseline profile officially. Rpcs3 being open source means you can just create your own personal branch with the workarounds, there is no need to affect the official releases.

Can you tell which atomic specifically?

@kd-11
Copy link
Contributor

kd-11 commented Dec 11, 2024

https://developer.arm.com/documentation/109697/2024_09/Feature-descriptions/The-Armv8-1-architecture-extension
Go to the LSE section. It's all of them.

Before 8.1 atomics work in a different way. To cope, base armv8 emits jumps to helper functions like __aarch64_ldadd4_acq_rel for example to do adds, instead of the armv8.1-a version which just emits an atomic add (ldaddal) in-place. The sheer number of atomics we use rules out the fallback as a reasonable expectation on shipping code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants