This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
RE: [PATCH][binutils][AArch64][3/3] Add support for float16 (IEEE format) for AArch64 backend.
- From: Tamar Christina <Tamar dot Christina at arm dot com>
- To: Tamar Christina <Tamar dot Christina at arm dot com>, Barnaby Wilks <Barnaby dot Wilks at arm dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Cc: nd <nd at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Wed, 24 Jul 2019 13:40:09 +0000
- Subject: RE: [PATCH][binutils][AArch64][3/3] Add support for float16 (IEEE format) for AArch64 backend.
- Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=arm.com;dmarc=pass action=none header.from=arm.com;dkim=pass header.d=arm.com;arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZUFxfl1411x3fpUnG/slGXGhDCX26GlxYsJydVWW90Q=; b=F/q3JUNJqpU9Nhi/yAan791QwJjg64KxiH/RrVkPfoiag9c33zJhYqDsh6b0pgIMIJTTL0p3MuuInh6MF5Q5d+kGtnhHTO43JVIqt8tTJKP27OtEl9awXposznmkVIUzk5HIQk5mzCHsnMKGMEBPxl34wIC2EOl477ylwNYFIA75NrH16QrLuCfzZJRmlKzYtK+GRJLKEjlFMYiLF6bNWe6tFVDDT+Ema7WIj8kUUe33VLSIee2vkgMiOVHoSiQks69Mhfb6cw0YvdnT1M6lhScisbrjjMSiVheyNUEyomjJtQ/T16XdxvBjn5MR7aDzWm5+hr5atoN6G0YZiNGjfQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bKcib+1cu0AH9mKOkCBVLuOxig3x3F/BPKbx8VXoqpE+F7UJ9LZfqYoSEgpNskbFvtMYduRLOmTYkL8F0HYdHiuYaLWjQztzcUKB1wBt8UTEZcAh6C38m9tudZL0K6Z9s7eQzEPPFsecfhqUwIjRZ4tA5crG24c1vBqnJMwdKVkXD9c2dLamvOL++++DsxL/uyOXRRdaKykXGdbxqiJ7SpA4TdaqUEC1p2TMu8+2LOuZbdJb1zRRhWTaRkRCp02KnUlIIx/aMi1oeAhhjMbP/ixHCQFNN/CmIkJLLS+shnHlGbglrE6qKHb8+cwvM8T3QZ5R+d6NXHs9RIk3fQRZaA==
- References: <bf60fccd-0268-43e9-5cea-343649acb733@arm.com> <ae75487d-8008-b1f6-3d00-952cf9b256e0@arm.com> <DB6PR0802MB23090A0F32436A84A7214FD3FFC60@DB6PR0802MB2309.eurprd08.prod.outlook.com>
And also document the new directive in gas/doc/c-aarch64.texi (and same for the Arm equivalent).
Thanks,
Tamar
> -----Original Message-----
> From: binutils-owner@sourceware.org <binutils-owner@sourceware.org>
> On Behalf Of Tamar Christina
> Sent: Wednesday, July 24, 2019 12:12
> To: Barnaby Wilks <Barnaby.Wilks@arm.com>; binutils@sourceware.org
> Cc: nd <nd@arm.com>; Richard Earnshaw <Richard.Earnshaw@arm.com>;
> Marcus Shawcroft <Marcus.Shawcroft@arm.com>
> Subject: RE: [PATCH][binutils][AArch64][3/3] Add support for float16 (IEEE
> format) for AArch64 backend.
>
> Hi Barnaby,
>
> Thanks for the patch!
>
> Your float16-le.s and float-16-be.s look identical to me. Could you delete one
> and rename it to float16.s and use that as the source for both.
>
> Also could you add a NEWS entry for both these and the AArch32 patches.
>
> Thanks,
> Tamar
>
>
> > -----Original Message-----
> > From: binutils-owner@sourceware.org <binutils-owner@sourceware.org>
> On
> > Behalf Of Barnaby Wilks
> > Sent: Thursday, July 11, 2019 16:27
> > To: binutils@sourceware.org
> > Cc: nd <nd@arm.com>; Richard Earnshaw <Richard.Earnshaw@arm.com>;
> > Marcus Shawcroft <Marcus.Shawcroft@arm.com>
> > Subject: [PATCH][binutils][AArch64][3/3] Add support for float16 (IEEE
> > format) for AArch64 backend.
> >
> > Hello,
> >
> > This is part of a patch series that implements a directive for
> > assembling 16-bit floating point constants for Arm and AArch64.
> >
> > This patch implements a float16 directive for assembling 16 bit IEEE
> > 754 floating point numbers for AArch64.
> >
> > The syntax of the directive is:
> > .float16 <0-n decimal numbers>
> > e.g.
> > .float16 0.5
> > .float16 10.2, NaN, 452.09
> >
> > The floats will always be encoded using the binary16 format as
> > described in the IEEE 754-2008 standard. There is no need to support
> > Arm's alternative half-precision format since AArch64 only supports the
> IEEE format.
> >
> > Added testcases to verify the correct encoding (for big and little
> > endian
> > targets) and cross-referenced the encodings with GCC's __fp16 type to
> > ensure consistency.
> >
> > Cross compiled and regtested on aarch64-none-elf and
> > aarch64-none-linux- gnu with no issues.
> >
> > I don't have write access, so if it's OK then could someone commit on
> > my behalf?
> >
> > Thanks,
> > Barney
> >
> > gas/ChangeLog:
> >
> > 2019-07-11 Barnaby Wilks<barnaby.wilks@arm.com>
> >
> > * config/tc-aarch64.c: Add float16 directive and add "Hh" to
> > acceptable float
> > characters.
> > * testsuite/gas/aarch64/float16-be.d: New test.
> > * testsuite/gas/aarch64/float16-be.s: New test.
> > * testsuite/gas/aarch64/float16-le.d: New test.
> > * testsuite/gas/aarch64/float16-le.s: New test.