[all-commits] [llvm/llvm-project] 17897c: [RISCV][NFC] Add test case for accept hexadecimal ...
Kito Cheng via All-commits
all-commits at lists.llvm.org
Fri Apr 14 03:48:32 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 17897c942699ec885fab43eaf9919e6d562b8896
https://github.com/llvm/llvm-project/commit/17897c942699ec885fab43eaf9919e6d562b8896
Author: Kito Cheng <kito.cheng at sifive.com>
Date: 2023-04-14 (Fri, 14 Apr 2023)
Changed paths:
M llvm/test/MC/RISCV/zfa-valid.s
Log Message:
-----------
[RISCV][NFC] Add test case for accept hexadecimal floating-point for fli instructions
Zfa provide fli instruction to load a floating point immediate value,
and some of those are not easy to write and read by human, so
hexadecimal floating-point format should be a good alternative way to write:
Consider this case: 1^-16 = 1.52587890625e-05 (decimal) vs 0x1p-16 (hexadecimal)
The hexadecimal format is easier to write for human.
Fortunately hexadecimal floating-point constants already supported in
C99, so actually we don't need to add any extra code to support that.
This patch added test case for demonstrate we support that and also make
sure this will be supported in future.
I also gonna to talk with ISA folks to adding hexadecimal floating-point
to the ISA spec, so that user will know fli accept value in this format.
Reviewed By: asb
Differential Revision: https://reviews.llvm.org/D148077
More information about the All-commits
mailing list