Hi, everyone.

With the help of aballier, leio and mrueg I'd like to proudly present
you a proposal for initial set of CPU_FLAGS_ARM flags. The flags apply
commonly to Gentoo 'arm' and 'arm64' profiles, and the majority of them
is going to be forced by profiles [patch for them will follow later].


The change comes along with cpuid2cpuflags port to ARM. The port can be
tested in 'arm-wip' branch [1]. Quick snippet:

  ACCEPT_KEYWORDS='**' EGIT_BRANCH=arm-wip \
    emerge -1v =app-portage/cpuid2cpuflags-9999

(note: -9999 is freshly added, you may need to sync)

For those curious of technical details, the ARM variant uses getauxval()
with AT_HWCAP{,2} for instruction sets, and uname() machine field to
identify the ARM subarchitecture (and works on GNU/Linux only). Both
'arm' and 'arm64' kernels are supported.

Note: I haven't been able to find or figure out a proper way to detect
Thumb-2 or ARMv6T2. If anybody has a clue how to do it, I'd appreciate
that.


Now, the proposed flag list:

aes - Use the AES cryptography instruction set
crc32 - Use the CRC32 instruction set
iwmmxt - Use the iwMMXt instruction set
neon - Use the NEON (ASIMD) instruction set
sha1 - Use the SHA-1 cryptography instruction set
sha2 - Use the SHA-2 cryptography instruction set
thumb2 - Enable Thumb-2 instruction set (ARMv6T2 and ARMv7+)
v4 - Use ARMv4 instructions
v4t - Use ARMv4T instructions
v5t - Use ARMv5T instructions
v5te - Use ARMv5TE instructions
v5tej - Use ARMv5TEJ instructions
v6 - Use ARMv6 instructions
v7 - Use ARMv7 instructions
vfp - Use the VFP instruction set
vfp-d16 - Indicate that the FPU has 16 64-bit VFP registers
vfp-d32 - Indicate that the FPU has 32 64-bit VFP registers
vfpv3 - Use the VFP version 3 instruction set
vfpv4 - Use the VFP version 4 instruction set


Please review the flags, test the code and let us know what you think of
it.


[1]:https://github.com/mgorny/cpuid2cpuflags/tree/arm-wip

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to