crt/fmal.c: Use hardware to handle potential denormal numbers

This is pure refactoring in preparation for porting this implementation
to `float` and `double`, as we are having a bug there.

Testcase:

  #include <assert.h>
  #include <math.h>

  int main(void)
    {
      volatile double a =  0x1.0000000000003p-461;
      volatile double b =  0x1.0000000000007p-461;
      volatile double c = -0x1.000000000000Ap-922;

      assert(a * b + c == 0);
      assert(fma(a, b, c) == 0x1.5p-1022);
    }

Signed-off-by: Liu Hao <lh_mouse@126.com>
1 file changed