sim: Factor out NaN handling in floating point operations
authorFaraz Shahbazker <fshahbazker@wavecomp.com>
Wed, 2 Feb 2022 10:17:23 +0000 (11:17 +0100)
committerMike Frysinger <vapier@gentoo.org>
Sat, 5 Feb 2022 00:37:25 +0000 (19:37 -0500)
commitb6af5f3a74d9ed8d78e2467a895d5ae0b732f114
tree59400b169106b1e869e46b9cf77d58b967ffc664
parentbf484e93483776072291c5cad2e289567d74c818
sim: Factor out NaN handling in floating point operations

2022-02-01  Faraz Shahbazker  <fshahbazker@wavecomp.com>

sim/common/ChangeLog:
* sim-fpu.c (sim_fpu_op_nan): New.
(sim_fpu_add): Factor out NaN operand handling with
a call to sim_fpu_op_nan.
(sim_fpu_sub, sim_fpu_mul, sim_fpu_div): Likewise.
(sim_fpu_rem, sim_fpu_max, sim_fpu_min): Likewise.
* sim-fpu.h (sim_fpu_op_nan): New declaration.
sim/common/sim-fpu.c
sim/common/sim-fpu.h