|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Double-precision FPU probe implementation (see ra8_fpu_probe.h). More...
#include "ra8_fpu_probe.h"Go to the source code of this file.
Functions | |
| double | ra8_fpu_dp_madd (double a, double b, double c) |
| Evaluate the double-precision product-sum a * b + c. | |
Double-precision FPU probe implementation (see ra8_fpu_probe.h).
Holds the single double product-sum whose object-code lowering witnesses the FPU width of the build target: hardware .f64 opcodes on the RA8P1 DP-FPU build (-mfpu=fpv5-d16) versus soft-float __aeabi_d* calls on the RA8D2 SP-FPU build (-mfpu=fpv5-sp-d16). The authoritative contract lives on the declaration in ra8_fpu_probe.h.
Definition in file ra8_fpu_probe.c.
| double ra8_fpu_dp_madd | ( | double | a, |
| double | b, | ||
| double | c ) |
Evaluate the double-precision product-sum a * b + c.
A minimal IEEE-754 binary64 (double) computation used as a compile-target witness for the FPU width (see the file header). On a DP-FPU build the body lowers to hardware .f64 opcodes; on an SP-FPU build it lowers to soft-float calls. The math itself – multiply then add, or a fused multiply-add – is identical in both cases and is exercised for numeric correctness by the host unit test.
| [in] | a | First multiplicand, any finite double. |
| [in] | b | Second multiplicand, any finite double. |
| [in] | c | Addend, any finite double. |
| a*b+c | The IEEE-754 binary64 result (subject to a single rounding, or fewer if the compiler contracts to a fused multiply-add). |
Definition at line 19 of file ra8_fpu_probe.c.