[PATCH v3] soft-fp: Add the lack of implementation for 128 bit self-contained.

Richard Henderson rth@twiddle.net
Thu Jul 26 16:59:00 GMT 2018


On 07/26/2018 06:16 AM, Zong Li wrote:
> +#define _FP_FRAC_CLZ_8(R, X)                    \
> +  do                                            \
> +    {                                           \
> +      if (X##_f[7])                             \
> +        __FP_CLZ ((R), X##_f[7]);               \
> +      else if (X##_f[6])                        \
> +        {                                       \
> +          __FP_CLZ ((R), X##_f[6]);             \
> +          (R) += _FP_W_TYPE_SIZE;               \
> +        }                                       \
> +      else if (X##_f[5])                        \
...

Perhaps better as

#define _FP_FRAC_CLZ_8(R, X)                   \
  do                                           \
    {                                          \
      int fs8_i;                               \
      for (fs8_i = 7; fs8_i > 0; fs8_i--)      \
        if (X##_f[fs8_i])                      \
          break;                               \
      __FP_CLZ ((R), X##_f[fs8_i]);            \
      (R) += _FP_W_TYPE_SIZE * (7 - fs8_i);    \
    }                                          \
  while (0)


r~



More information about the Libc-alpha mailing list