Skip to content

Commit

Permalink
ARM and AArch64 feature bits
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao committed May 28, 2017
1 parent 24040b3 commit 015e100
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/features_aarch64.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

// AArch64 features definition
// hwcap
AArch64_FEATURE_DEF(crypto, 3, 0)
AArch64_FEATURE_DEF(crc, 7, 0)
AArch64_FEATURE_DEF(lse, 8, 0)
AArch64_FEATURE_DEF(fullfp16, 9, 0)
AArch64_FEATURE_DEF(rdm, 12, 50000)
AArch64_FEATURE_DEF(jscvt, 13, UINT32_MAX)
AArch64_FEATURE_DEF(fcma, 14, UINT32_MAX)
AArch64_FEATURE_DEF(lrcpc, 15, UINT32_MAX)
// AArch64_FEATURE_DEF(ras, ???, 0)
28 changes: 28 additions & 0 deletions src/features_arm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// This file is a part of Julia. License is MIT: https://julialang.org/license

// ARM features definition
// hwcap
ARM_FEATURE_DEF(neon, 12, 0)
ARM_FEATURE_DEF(vfp3, 13, 0)
// ARM_FEATURE_DEF(vfpv3d16, 14, 0) // d16
ARM_FEATURE_DEF(vfp4, 16, 0)
ARM_FEATURE_DEF(hwdiv_arm, 17, 0)
ARM_FEATURE_DEF(hwdiv, 18, 0)
ARM_FEATURE_DEF(d32, 19, 0) // -d16

// hwcap2
ARM_FEATURE_DEF(crypto, 32 + 0, 0)
ARM_FEATURE_DEF(crc, 32 + 4, 0)
// ARM_FEATURE_DEF(ras, 32 + ???, 0)
// ARM_FEATURE_DEF(fullfp16, 32 + ???, 0)

// custom bits to match llvm model
ARM_FEATURE_DEF(v7, 32 * 2 + 0, 0)
ARM_FEATURE_DEF(v7a, 32 * 2 + 1, 0)
ARM_FEATURE_DEF(v7r, 32 * 2 + 2, 0)
// no v7m for now
ARM_FEATURE_DEF(v8, 32 * 2 + 3, 0)
ARM_FEATURE_DEF(v8a, 32 * 2 + 4, 0)
ARM_FEATURE_DEF(v8r, 32 * 2 + 5, 0)
ARM_FEATURE_DEF(v8_1a, 32 * 2 + 6, 0)
ARM_FEATURE_DEF(v8_2a, 32 * 2 + 7, 0)

0 comments on commit 015e100

Please sign in to comment.