arch-riscv: Fix floating-point conversion bugs
authorAlec Roelke <ar4jc@virginia.edu>
Tue, 5 Dec 2017 03:54:35 +0000 (22:54 -0500)
committerAlec Roelke <ar4jc@virginia.edu>
Tue, 16 Jan 2018 16:23:31 +0000 (16:23 +0000)
commit34364ffc156ce32ca100bb1a2006468d348d86b9
treeb23c6760399bddd1006a2d159bab38736efc9c75
parent694672093ece3253c984d8809f64440022a82978
arch-riscv: Fix floating-point conversion bugs

Using the fetestexcept function to check for specific types of floating
point exceptions is unreliable for some kinds of
floating-point-to-integer conversion operations. RISC-V code used to
make use of them to check for some exceptional cases like overflow and
underflow, which caused incorrect output when compiler optimization is
turned on. This patch changes the use of fetestexcept to explicit checks
for those exceptional cases.

Change-Id: Id983906ea0664dc246e115a9e470d9ab7733bde1
Reviewed-on: https://gem5-review.googlesource.com/6402
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Alec Roelke <ar4jc@virginia.edu>
src/arch/riscv/isa/decoder.isa