Skip to content

Commit 3635a90

Browse files
committed
Add the Aarch64 HWCAP_ values for Android
1 parent 7f9ed8c commit 3635a90

File tree

1 file changed

+43
-0
lines changed
  • src/unix/linux_like/android/b64/aarch64

1 file changed

+43
-0
lines changed

src/unix/linux_like/android/b64/aarch64/mod.rs

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,49 @@ pub const O_LARGEFILE: ::c_int = 0o400000;
5757
pub const SIGSTKSZ: ::size_t = 16384;
5858
pub const MINSIGSTKSZ: ::size_t = 5120;
5959

60+
// From NDK's asm/hwcap.h
61+
pub const HWCAP_FP: ::c_ulong = 1 << 0;
62+
pub const HWCAP_ASIMD: ::c_ulong = 1 << 1;
63+
pub const HWCAP_EVTSTRM: ::c_ulong = 1 << 2;
64+
pub const HWCAP_AES: ::c_ulong = 1 << 3;
65+
pub const HWCAP_PMULL: ::c_ulong = 1 << 4;
66+
pub const HWCAP_SHA1: ::c_ulong = 1 << 5;
67+
pub const HWCAP_SHA2: ::c_ulong = 1 << 6;
68+
pub const HWCAP_CRC32: ::c_ulong = 1 << 7;
69+
pub const HWCAP_ATOMICS: ::c_ulong = 1 << 8;
70+
pub const HWCAP_FPHP: ::c_ulong = 1 << 9;
71+
pub const HWCAP_ASIMDHP: ::c_ulong = 1 << 10;
72+
pub const HWCAP_CPUID: ::c_ulong = 1 << 11;
73+
pub const HWCAP_ASIMDRDM: ::c_ulong = 1 << 12;
74+
pub const HWCAP_JSCVT: ::c_ulong = 1 << 13;
75+
pub const HWCAP_FCMA: ::c_ulong = 1 << 14;
76+
pub const HWCAP_LRCPC: ::c_ulong = 1 << 15;
77+
pub const HWCAP_DCPOP: ::c_ulong = 1 << 16;
78+
pub const HWCAP_SHA3: ::c_ulong = 1 << 17;
79+
pub const HWCAP_SM3: ::c_ulong = 1 << 18;
80+
pub const HWCAP_SM4: ::c_ulong = 1 << 19;
81+
pub const HWCAP_ASIMDDP: ::c_ulong = 1 << 20;
82+
pub const HWCAP_SHA512: ::c_ulong = 1 << 21;
83+
pub const HWCAP_SVE: ::c_ulong = 1 << 22;
84+
pub const HWCAP_ASIMDFHM: ::c_ulong = 1 << 23;
85+
pub const HWCAP_DIT: ::c_ulong = 1 << 24;
86+
pub const HWCAP_USCAT: ::c_ulong = 1 << 25;
87+
pub const HWCAP_ILRCPC: ::c_ulong = 1 << 26;
88+
pub const HWCAP_FLAGM: ::c_ulong = 1 << 27;
89+
pub const HWCAP_SSBS: ::c_ulong = 1 << 28;
90+
pub const HWCAP_SB: ::c_ulong = 1 << 29;
91+
pub const HWCAP_PACA: ::c_ulong = 1 << 30;
92+
pub const HWCAP_PACG: ::c_ulong = 1 << 31;
93+
pub const HWCAP2_DCPODP: ::c_ulong = 1 << 0;
94+
pub const HWCAP2_SVE2: ::c_ulong = 1 << 1;
95+
pub const HWCAP2_SVEAES: ::c_ulong = 1 << 2;
96+
pub const HWCAP2_SVEPMULL: ::c_ulong = 1 << 3;
97+
pub const HWCAP2_SVEBITPERM: ::c_ulong = 1 << 4;
98+
pub const HWCAP2_SVESHA3: ::c_ulong = 1 << 5;
99+
pub const HWCAP2_SVESM4: ::c_ulong = 1 << 6;
100+
pub const HWCAP2_FLAGM2: ::c_ulong = 1 << 7;
101+
pub const HWCAP2_FRINT: ::c_ulong = 1 << 8;
102+
60103
pub const SYS_io_setup: ::c_long = 0;
61104
pub const SYS_io_destroy: ::c_long = 1;
62105
pub const SYS_io_submit: ::c_long = 2;

0 commit comments

Comments
 (0)