mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-06 21:25:03 -05:00
arm: Profile/variation detection improvements
* Detection of 64-bit Arm v8-a * Proper detection of integer division support * always on v7-m, v8-a, v9-a, v8-m.main * sometimes on v7-a, v7-r, v8-r * never on v8-m.base v6-m, v6 and older "classic" * tl;dr: Rely on toolchain preprocessor definition For the most part these additional variations won't acutally work for native target builds, but sane -A detection is needed for "local" builds now. -R detection is left out as it's not likely to matter. Change-Id: I8f6a52edc4d14490fc00e2f487406eca701eef02
This commit is contained in:
parent
6d39bf5e48
commit
afe128f4cc
4 changed files with 30 additions and 90 deletions
|
|
@ -711,21 +711,18 @@ Lyre prototype 1 */
|
|||
/* define for all cpus from ARM family */
|
||||
#if ARCH == ARCH_ARM
|
||||
#define CPU_ARM
|
||||
#define ARM_ARCH ARCH_VERSION /* ARMv{4,5,6,7} */
|
||||
#define ARM_PROFILE ARCH_PROFILE /* Classic, Microcontroller */
|
||||
#define ARM_ARCH ARCH_VERSION /* ARMv{4,5,6,7,8,9} */
|
||||
#define ARM_PROFILE ARCH_PROFILE /* Classic, Microcontroller, Application [,Realtime] */
|
||||
# if ARM_PROFILE == ARM_PROFILE_MICRO
|
||||
# define CPU_ARM_MICRO
|
||||
# if (ARM_ARCH >= 7)
|
||||
# define ARM_HAVE_HW_DIV
|
||||
# endif
|
||||
# elif ARM_PROFILE == ARM_PROFILE_CLASSIC
|
||||
# define CPU_ARM_CLASSIC
|
||||
# elif ARM_PROFILE == ARM_PROFILE_APPLICATION
|
||||
# define CPU_ARM_APPLICATION
|
||||
# if defined(__ARM_FEATURE_IDIV) // Some v7-a, all v8-a
|
||||
# define ARM_HAVE_HW_DIV
|
||||
# endif
|
||||
# endif
|
||||
#if defined(__ARM_FEATURE_IDIV)
|
||||
# define ARM_HAVE_HW_DIV
|
||||
#endif
|
||||
# if (CONFIG_PLATFORM & PLATFORM_NATIVE) && !defined(ARM_HAVE_HW_DIV)
|
||||
# define ARM_NEED_DIV0
|
||||
# endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue