libretro-common icon indicating copy to clipboard operation
libretro-common copied to clipboard

Improve ARM runtime feature detection on Linux

Open linkmauve opened this issue 4 years ago • 3 comments

getauxval(AT_HWCAP) is the best way to check for features on ARM and AArch64, as it doesn’t require parsing a file, instead it just returns a value provided by the kernel in our address space.

This has been tested on a Nintendo Switch running ArchLinuxARM, on both AArch64 and AArch32.

linkmauve avatar Nov 03 '20 23:11 linkmauve

Would this code work on Android and iOS?

inactive123 avatar Dec 13 '20 20:12 inactive123

I actually don’t know, I don’t have any such device available so I only tested on Linux. According to Android’s documentation it should, but I couldn’t find anything similar for iOS.

Edit: this codepath is only used on Linux anyway, we could extend it to Android but it doesn’t make sense for iOS it seems.

linkmauve avatar Dec 13 '20 20:12 linkmauve

Edit: this codepath is only used on Linux anyway, we could extend it to Android but it doesn’t make sense for iOS it seems.

Linux and Android. Android defines linux as well

phcoder avatar Feb 22 '22 09:02 phcoder