Add support for M5 and presumably future architectures#216
Closed
sethrj wants to merge 1 commit into
Closed
Conversation
Contributor
Author
|
I realize I need to update archspec-json first (similar to archspec/archspec-json#141 ). But the latest stable xcode clang --- m4.txt 2025-11-01 07:39:41
+++ native.txt 2025-11-01 07:39:43
@@ -36,7 +36,6 @@
#define __ARM_ARCH_8_4__ 1
#define __ARM_ARCH_8_5__ 1
#define __ARM_ARCH_8_6__ 1
-#define __ARM_ARCH_8_7__ 1
#define __ARM_ARCH_ISA_A64 1
#define __ARM_ARCH_PROFILE 'A'
#define __ARM_BF16_FORMAT_ALTERNATIVE 1
@@ -61,7 +60,6 @@
#define __ARM_FEATURE_IDIV 1
#define __ARM_FEATURE_JCVT 1
#define __ARM_FEATURE_LDREX 0xF
-#define __ARM_FEATURE_LOCALLY_STREAMING 1
#define __ARM_FEATURE_MATMUL_INT8 1
#define __ARM_FEATURE_NUMERIC_MAXMIN 1
#define __ARM_FEATURE_PAUTH 1
@@ -70,8 +68,6 @@
#define __ARM_FEATURE_SHA2 1
#define __ARM_FEATURE_SHA3 1
#define __ARM_FEATURE_SHA512 1
-#define __ARM_FEATURE_SME 1
-#define __ARM_FEATURE_SME2 1
#define __ARM_FEATURE_UNALIGNED 1
#define __ARM_FP 0xE
#define __ARM_FP16_ARGS 1 |
Contributor
Author
|
Still no new flags as of the 26.2 update with |
Contributor
Author
|
Still nothing (clang 'native'sees as m5 as m3 it seems): $ clang --version
Apple clang version 17.0.0 (clang-1700.6.3.2)
Target: arm64-apple-darwin25.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ clang -dM -E - -mcpu=apple-m5 < /dev/null | grep __ARM_FEATURE_ | cut -d _ -f 5- | cut -d " " -f 1 | sort
clang: error: unsupported argument 'apple-m5' to option '-mcpu='
$ sysctl hw machdep | grep brand_string
machdep.cpu.brand_string: Apple M5
$ for arch in apple-m2 apple-m3 apple-m4 native; do clang -dM -E - -mcpu=$arch < /dev/null | grep __ARM_FEATURE_ | cut -d _ -f 5- | cut -d " " -f 1 | sort > $arch.txt; done
$ diff apple-m3.txt native.txt
$ diff apple-m4.txt native.txt
22d21
< LOCALLY_STREAMING
31,32d29
< SME
< SME2
|
Contributor
Author
|
At least the current clang sees M4 as "native" (on M5) rather than M3. But still no changes in the flags... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tested on my new Macbook Pro M5.