summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Gatti <a.gatti@frob.it>2024-11-20 19:07:17 +0100
committerDamien George <damien@micropython.org>2024-11-30 12:42:51 +1100
commit579e840de6d71503658f3c427c1e210c7cb85e9e (patch)
tree47e9381cf86df7e0a555085494e0d8d26d9aa6c7
parentbeabef5aac2c578f6b2f87d42bfccfa4ff074416 (diff)
extmod/modplatform: Distinguish AArch64 from AArch32.
This commit adds a new platform architecture name for Arm CPUs running in 64 bits mode ("aarch64"). The 32 bits name is left as "arm" to maintain compatibility with existing code. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
-rw-r--r--extmod/modplatform.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/extmod/modplatform.h b/extmod/modplatform.h
index b932551c7..0c83d7b8c 100644
--- a/extmod/modplatform.h
+++ b/extmod/modplatform.h
@@ -36,7 +36,11 @@
// See: https://sourceforge.net/p/predef/wiki/Home/
#if defined(__ARM_ARCH)
+#if defined(__ARM_ARCH_ISA_A64)
+#define MICROPY_PLATFORM_ARCH "aarch64"
+#else
#define MICROPY_PLATFORM_ARCH "arm"
+#endif
#elif defined(__x86_64__) || defined(_M_X64)
#define MICROPY_PLATFORM_ARCH "x86_64"
#elif defined(__i386__) || defined(_M_IX86)