1 |
Hi, everyone. |
2 |
|
3 |
With the help of aballier, leio and mrueg I'd like to proudly present |
4 |
you a proposal for initial set of CPU_FLAGS_ARM flags. The flags apply |
5 |
commonly to Gentoo 'arm' and 'arm64' profiles, and the majority of them |
6 |
is going to be forced by profiles [patch for them will follow later]. |
7 |
|
8 |
|
9 |
The change comes along with cpuid2cpuflags port to ARM. The port can be |
10 |
tested in 'arm-wip' branch [1]. Quick snippet: |
11 |
|
12 |
ACCEPT_KEYWORDS='**' EGIT_BRANCH=arm-wip \ |
13 |
emerge -1v =app-portage/cpuid2cpuflags-9999 |
14 |
|
15 |
(note: -9999 is freshly added, you may need to sync) |
16 |
|
17 |
For those curious of technical details, the ARM variant uses getauxval() |
18 |
with AT_HWCAP{,2} for instruction sets, and uname() machine field to |
19 |
identify the ARM subarchitecture (and works on GNU/Linux only). Both |
20 |
'arm' and 'arm64' kernels are supported. |
21 |
|
22 |
Note: I haven't been able to find or figure out a proper way to detect |
23 |
Thumb-2 or ARMv6T2. If anybody has a clue how to do it, I'd appreciate |
24 |
that. |
25 |
|
26 |
|
27 |
Now, the proposed flag list: |
28 |
|
29 |
aes - Use the AES cryptography instruction set |
30 |
crc32 - Use the CRC32 instruction set |
31 |
iwmmxt - Use the iwMMXt instruction set |
32 |
neon - Use the NEON (ASIMD) instruction set |
33 |
sha1 - Use the SHA-1 cryptography instruction set |
34 |
sha2 - Use the SHA-2 cryptography instruction set |
35 |
thumb2 - Enable Thumb-2 instruction set (ARMv6T2 and ARMv7+) |
36 |
v4 - Use ARMv4 instructions |
37 |
v4t - Use ARMv4T instructions |
38 |
v5t - Use ARMv5T instructions |
39 |
v5te - Use ARMv5TE instructions |
40 |
v5tej - Use ARMv5TEJ instructions |
41 |
v6 - Use ARMv6 instructions |
42 |
v7 - Use ARMv7 instructions |
43 |
vfp - Use the VFP instruction set |
44 |
vfp-d16 - Indicate that the FPU has 16 64-bit VFP registers |
45 |
vfp-d32 - Indicate that the FPU has 32 64-bit VFP registers |
46 |
vfpv3 - Use the VFP version 3 instruction set |
47 |
vfpv4 - Use the VFP version 4 instruction set |
48 |
|
49 |
|
50 |
Please review the flags, test the code and let us know what you think of |
51 |
it. |
52 |
|
53 |
|
54 |
[1]:https://github.com/mgorny/cpuid2cpuflags/tree/arm-wip |
55 |
|
56 |
-- |
57 |
Best regards, |
58 |
Michał Górny |