[PATCH] glibc: support e5500 and e6500
Joseph Myers
joseph@codesourcery.com
Wed Feb 20 17:21:00 GMT 2019
On Wed, 20 Feb 2019, C.r. Guo wrote:
> From: Chunrong Guo <chunrong.guo@nxp.com>
>
> Signed-off-by: Chunrong Guo <chunrong.guo@nxp.com>
I don't see a copyright assignment on file from NXP (though there was an
older one from Freescale).
> diff --git a/sysdeps/powerpc/powerpc64/be/e5500/Implies b/sysdeps/powerpc/powerpc64/be/e5500/Implies
> new file mode 100644
> index 0000000..a795586
> --- /dev/null
> +++ b/sysdeps/powerpc/powerpc64/be/e5500/Implies
> @@ -0,0 +1,2 @@
> +powerpc/powerpc64/e5500
> +
No blank lines at the end of files, the commit hooks don't allow them to
be pushed (or whitespace at end of line, or tabs-after-spaces
indentation).
> +static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 };
> +static const ieee_float_shape_type a_inf = {.word = 0x7f800000 };
Use INFINITY and NAN constants if needed, rather than hardcoding
representations like this.
> +static const float two108 = 3.245185536584267269e+32;
> +static const float twom54 = 5.551115123125782702e-17;
Use hex floats (and there's no real need to have such variables, just
write 0x1p108 or 0x1p-54 or corresponding float constants as needed
directly in the code using such values).
> +#define FMADD(a_, c_, b_) \
> + ({ double __r; \
> + __asm__ ("fmadd %[r], %[a], %[c], %[b]\n" \
> + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
> + __r;})
> +#define FNMSUB(a_, c_, b_) \
> + ({ double __r; \
> + __asm__ ("fnmsub %[r], %[a], %[c], %[b]\n" \
> + : [r] "=f" (__r) : [a] "f" (a_), [c] "f" (c_), [b] "f" (b_)); \
> + __r;})
Use __builtin_fma / __builtin_fmaf, not asm.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list