diff options
author | Kuan-Lin Chen <rufus@andestech.com> | 2023-12-20 15:18:59 +0800 |
---|---|---|
committer | Kito Cheng <kito.cheng@sifive.com> | 2024-01-04 21:41:30 +0800 |
commit | 057dc349021660c40699fb5c98fd9cac8e168653 (patch) | |
tree | 5e108e6ad0217d4abbbf9214b5b5613a884c5e86 /gcc/go | |
parent | 3ac58063114cf491891072be6205d32a42c6707d (diff) | |
download | gcc-057dc349021660c40699fb5c98fd9cac8e168653.zip gcc-057dc349021660c40699fb5c98fd9cac8e168653.tar.gz gcc-057dc349021660c40699fb5c98fd9cac8e168653.tar.bz2 |
RISC-V: Nan-box the result of movhf on soft-fp16
According to spec, fmv.h checks if the input operands are correctly
NaN-boxed. If not, the input value is treated as an n-bit canonical NaN.
This patch fixs the issue that operands returned by soft-fp16 libgcc
(i.e., __truncdfhf2) was not correctly NaN-boxed.
gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_legitimize_move): Expand movfh
with Nan-boxing value.
* config/riscv/riscv.md (*movhf_softfloat_unspec): New pattern.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/_Float16-nanboxing.c: New test.
Co-authored-by: Patrick Lin <patrick@andestech.com>
Co-authored-by: Rufus Chen <rufus@andestech.com>
Co-authored-by: Monk Chiang <monk.chiang@sifive.com>
Diffstat (limited to 'gcc/go')
0 files changed, 0 insertions, 0 deletions