diff options
author | Barnaby Wilks <barnaby.wilks@arm.com> | 2019-08-22 11:13:23 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2019-08-22 11:13:23 +0100 |
commit | b20d385926d84f7daa8cd7c54f748f3d6a81bfc6 (patch) | |
tree | b1c5502cd2b83ecc951d43912a012fbca3aa1276 /gas/config/tc-aarch64.c | |
parent | a051e2f3e0c1cedf4be0e1fedcd383fd203c769c (diff) | |
download | gdb-b20d385926d84f7daa8cd7c54f748f3d6a81bfc6.zip gdb-b20d385926d84f7daa8cd7c54f748f3d6a81bfc6.tar.gz gdb-b20d385926d84f7daa8cd7c54f748f3d6a81bfc6.tar.bz2 |
Implement a float16 directive for assembling 16 bit IEEE 754 floating point numbers for the AArch64 assembler.
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.
gas * config/tc-aarch64.c: Add float16 directive and add "Hh" to
acceptable float characters.
* doc/c-aarch64.texi: Documentation for float16 directive.
* testsuite/gas/aarch64/float16-be.d: New test.
* testsuite/gas/aarch64/float16-le.d: New test.
* testsuite/gas/aarch64/float16.s: New test.
* NEWS: Add NEWS entry.
Diffstat (limited to 'gas/config/tc-aarch64.c')
-rw-r--r-- | gas/config/tc-aarch64.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index 136297a..735ecd6 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -529,7 +529,7 @@ const char EXP_CHARS[] = "eE"; /* As in 0f12.456 */ /* or 0d1.2345e12 */ -const char FLT_CHARS[] = "rRsSfFdDxXeEpP"; +const char FLT_CHARS[] = "rRsSfFdDxXeEpPhH"; /* Prefix character that indicates the start of an immediate value. */ #define is_immediate_prefix(C) ((C) == '#') @@ -2106,6 +2106,7 @@ const pseudo_typeS md_pseudo_table[] = { {"dword", s_aarch64_elf_cons, 8}, {"variant_pcs", s_variant_pcs, 0}, #endif + {"float16", float_cons, 'h'}, {0, 0, 0} }; |