[Patch soft-fp] Add support for various half-precision conversion routines

James Greenhalgh james.greenhalgh@arm.com
Wed Sep 7 15:59:00 GMT 2016


Hi,

This patch adds conversion routines required for _Float16 support in
AArch64.

These are one-step conversions to and from TImode and TFmode. We need
these on AArch64 regardless of presence of the ARMv8.2-A 16-bit floating-point
extensions, and conversion to and from DImode, which we can do natively
with the ARMv8.2-A extensions, but must emulate where they are not available.

I'm adding this to glibc as I'd like these functions imported in to GCC's
libgcc and this seems to be the upstream for that.

What I'm not clear about is whether this patch is sufficient on the glibc
side, or if I also need to wire something up in a Makefile over here?

I'm also not sure how soft-fp gets tested. These functions were tested as
part of work to enable _Float16 in GCC, so have been tested against the
suite added by Joseph Myers in
https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01290.html . I know this is
a poor testing record, so any advice as to what testing is required for
soft-fp would be very much appreciated.

In the patch below, soft-fp/half.h is derived from soft-fp/single.h .
The conversion routines are derivatives of their respective SFmode
variants.

Thanks,
James

---
2016-09-07  James Greenhalgh  <james.greenhalgh@arm.com>

	* soft-fp/extendhftf2.c: New.
	* soft-fp/fixhfti.c: Likewise.
	* soft-fp/fixunshfti.c: Likewise.
	* soft-fp/floattihf.c: Likewise.
	* soft-fp/floatuntihf.c: Likewise.
	* soft-fp/half.h: Likewise.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Patch-soft-fp-Add-support-for-various-half-precision.patch
Type: text/x-patch
Size: 17065 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160907/547a4ed1/attachment.bin>


More information about the Libc-alpha mailing list