arm: Add missing VCVT instructions for FP16 support
Adds VCVT instructions for FP16 data types to the ARM assembler and disassembler.
This commit introduces support for missing VCVT (Vector Convert) instructions for the FP16 (16-bit floating-point) data type in the ARM toolchain. The new instructions, which handle conversions between floating-point and fixed-point formats, are mapped to existing FPv3 Half Precision encodings. The changes include updates to the assembler’s configuration for ARM, the disassembler’s opcode table, and test suite validation for ARMv8.2-A and ARMv8.1-m.main architectures.
In Details
This patch integrates missing VCVT instructions for FP16 data types into the ARM gas and disassembler components. It maps several new FP16 conversion flavors (e.g., f16<->[us]16) to legacy FP16 instruction encodings within CVT_FLAVOUR_VAR in tc-arm.c. The do_vfp_nsyn_cvt and do_neon_cvt_1 functions are updated to correctly handle the NS_HHI operand type and check for immediate operand validity. Additionally, opcode entries are added to arm-dis.c, and test cases are updated across various ARM FP16 test suites to verify the new VCVT variants.
- ARM
- A family of Reduced Instruction Set Computer (RISC) architectures developed by Arm Holdings. Widely used in mobile devices and increasingly in servers and embedded systems.
- VCVT
- Vector Convert, an ARM SIMD (Single Instruction, Multiple Data) instruction used to convert data between different numerical formats, such as floating-point and fixed-point.
- FP16
- A half-precision floating-point format, using 16 bits to represent floating-point numbers. It offers reduced memory usage and potentially faster computation compared to single-precision (FP32) or double-precision (FP64) formats.
- gas
- The GNU Assembler, responsible for translating assembly language code into machine code.
- disassembler
- A tool that translates machine code back into human-readable assembly language.
- ARMv8.2-A
- A specific version of the ARM architecture, which includes features like enhanced floating-point capabilities and support for formats like FP16.
- ARMv8.1-m.main
- A profile of the ARMv8-M architecture, often used in microcontrollers, that supports advanced features including certain floating-point operations.
- SIMD
- Single Instruction, Multiple Data. A class of parallel computers in Flynn's taxonomy that perform the same operation on multiple data points simultaneously.