xtensa: add DFPU support
Enables double-precision floating-point unit support for Xtensa processors.
This commit introduces support for the double-precision floating-point unit (DFPU) on Xtensa processors. It enables generation of DF (double-precision floating-point) mode comparisons and conditional moves, and correctly handles DF mode registers. The changes include updates to constraints, prototypes, cost tables, and emission logic in xtensa.cc, along with modifications to TARGET_HARD_FLOAT to reflect the availability of either single or double-precision hardware FP support. This allows Xtensa targets to leverage double-precision floating-point arithmetic.
In Details
This patch adds support for double-precision floating-point (DF mode) operations on Xtensa processors. It updates xtensa.cc to handle DF mode comparisons, conditional moves, and register allocation, including cost updates for xtensa_rtx_costs and xtensa_legitimate_constant_p. The TARGET_HARD_FLOAT macro is redefined to be true if either single or double-precision hardware FP is present. Changes were made to xtensa_expand_conditional_branch and xtensa_expand_conditional_move to correctly emit DF mode instructions and utilize the new xtensa_class_max_nregs function.
- DFPU
- Double-Precision Floating-Point Unit, a hardware component that performs floating-point calculations using 64-bit (double-precision) numbers.
- DF mode
- Refers to the machine mode used by GCC to represent double-precision floating-point numbers (64-bit).
- Xtensa
- A configurable processor architecture, often used in embedded systems, for which GCC provides specific backend support.
- TARGET_HARD_FLOAT
- A GCC target configuration macro indicating whether hardware support for floating-point operations is available.
- conditional move
- A CPU instruction that conditionally updates a destination register based on the state of processor flags, avoiding control flow branches.