[Patch][binutils][aarch64] .bfloat16 directive for AArch64 [7/10]
authorMatthew Malcomson <matthew.malcomson@arm.com>
Thu, 7 Nov 2019 17:07:32 +0000 (17:07 +0000)
committerMatthew Malcomson <matthew.malcomson@arm.com>
Thu, 7 Nov 2019 17:07:32 +0000 (17:07 +0000)
commiteb5bbc482128b08d2ee8a2470951a74d8351146f
treeb528a83fba70f26f1c1669cbb3c6a1a107006622
parent27cce8667f5c897751bb10d7c859b02b0bb26291
[Patch][binutils][aarch64] .bfloat16 directive for AArch64 [7/10]

Hi,

This patch is part of a series that adds support for Armv8.6-A
(Matrix Multiply and BFloat16 extensions) to binutils.

This patch implements the '.bfloat' directive for the AArch64 backend.

The syntax for the directive is:
  .bfloat16 <0-n numbers>
e.g.
  .bfloat16 12.0
  .bfloat16 0.123, 1.0, NaN, 5

This is implemented by utilizing the ieee_atof_detail function in order
to encode the slightly
different bfloat16 format.

Added testcases to verify the correct encoding for various bfloat16
values (NaN, Infinity (+ & -), normals, subnormals etc...).

Cross compiled and tested on aarch64-none-elf and aarch64-none-linux-gnu
with no issues.

Committed on behalf of Mihail Ionescu.

gas/ChangeLog:

2019-10-29  Mihail Ionescu  <mihail.ionescu@arm.com>
2019-10-29  Barnaby Wilks  <barnaby.wilks@arm.com>

* config/tc-aarch64.c (md_atof): Add encoding for the bfloat16 format.
* testsuite/gas/aarch64/bfloat16-directive-le.d: New test.
* testsuite/gas/aarch64/bfloat16-directive-be.d: New test.
* testsuite/gas/aarch64/bfloat16-directive.s: New test.

Is it ok for trunk?

Regards,
Mihail
gas/ChangeLog
gas/config/tc-aarch64.c
gas/testsuite/gas/aarch64/bfloat16-directive-be.d [new file with mode: 0644]
gas/testsuite/gas/aarch64/bfloat16-directive-le.d [new file with mode: 0644]
gas/testsuite/gas/aarch64/bfloat16-directive.s [new file with mode: 0644]