This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]