# Linux Kernel Module Cheat

#### 30.6.1. ARM VFP

The name for the ARMv7 and AArch32 floating point and SIMD instructions / registers.

Vector Floating Point extension.

TODO I think it was optional in ARMv7, find quote.

VFP has several revisions, named as VFPv1, VFPv2, etc. TODO: announcement dates.

As mentioned at: https://stackoverflow.com/questions/37790029/what-is-difference-between-arm64-and-armhf/48954012#48954012 the Linux kernel shows those capabilities in `/proc/cpuinfo` with flags such as `vfp`, `vfpv3` and others, see:

- https://github.com/torvalds/linux/blob/v4.18/arch/arm/kernel/setup.c#L1199

- https://github.com/torvalds/linux/blob/v4.18/arch/arm64/kernel/cpuinfo.c#L95

When a certain version of VFP is present on a CPU, the compiler prefix typically contains the `hf` characters which stands for Hard Float, e.g.: `arm-linux-gnueabihf`. This means that the compiler will emit VFP instructions instead of just using software implementations.

Bibliography:

- ARMv7 architecture reference manual Appendix D6 "Common VFP Subarchitecture Specification". It is not part of the ISA, but just an extension. TODO: that spec does not seem to have the instructions documented, and instruction like VMOV just live with the main instructions. Is VMOV part of VFP?

- https://mindplusplus.wordpress.com/2013/06/25/arm-vfp-vector-programming-part-1-introduction/

- https://en.wikipedia.org/wiki/ARM_architecture#Floating-point_(VFP)

- ARM VFP registers

- ARM VADD instruction

- ARM VCVT instruction