Skip to content

Commit

Permalink
Add initial support for Apple M1 (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
alalazo authored Apr 15, 2021
1 parent bc69b8d commit a2b7f57
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
31 changes: 31 additions & 0 deletions cpu/microarchitectures.json
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,12 @@
"versions": ":",
"flags": "-march=armv8-a -mtune=generic"
}
],
"apple-clang": [
{
"versions": ":",
"flags": "-march=armv8-a -mtune=generic"
}
]
}
},
Expand Down Expand Up @@ -1767,6 +1773,31 @@
]
}
},
"m1": {
"from": ["aarch64"],
"vendor": "Apple",
"features": [],
"compilers": {
"gcc": [
{
"versions": "8.0:",
"flags" : "-march=armv8.4-a -mtune=generic"
}
],
"clang" : [
{
"versions": "9.0:",
"flags" : "-march=armv8.4-a"
}
],
"apple-clang": [
{
"versions": "11.0:",
"flags" : "-march=armv8.4-a"
}
]
}
},
"arm": {
"from": [],
"vendor": "generic",
Expand Down
19 changes: 19 additions & 0 deletions tests/targets/darwin-bigsur-m1
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
machdep.cpu.cores_per_package: 8
machdep.cpu.core_count: 8
machdep.cpu.logical_per_package: 8
machdep.cpu.thread_count: 8
machdep.cpu.brand_string: Apple processor
hw.optional.floatingpoint: 1
hw.optional.watchpoint: 4
hw.optional.breakpoint: 6
hw.optional.neon: 1
hw.optional.neon_hpfp: 1
hw.optional.neon_fp16: 1
hw.optional.armv8_1_atomics: 1
hw.optional.armv8_crc32: 1
hw.optional.armv8_2_fhm: 1
hw.optional.armv8_2_sha512: 1
hw.optional.armv8_2_sha3: 1
hw.optional.amx_version: 2
hw.optional.ucnormal_mem: 1
hw.optional.arm64: 1

0 comments on commit a2b7f57

Please sign in to comment.