Skip to content

Commit

Permalink
split fcvtmod.w.d invalid check into 2 if statements
Browse files Browse the repository at this point in the history
  • Loading branch information
jordancarlin committed Apr 25, 2024
1 parent 824e357 commit 2921faf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion model/riscv_insts_zfa.sail
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,8 @@ function fcvtmod_helper(x64) = {
/* Raise FP exception flags, honoring the precedence of nV > nX */
let max_integer = if sign == 0b1 then unsigned(0x80000000)
else unsigned(0x7fffffff);
let flags : bits(5) = if (true_exp > 31 | unsigned(integer) > max_integer) then nvFlag()
let flags : bits(5) = if true_exp > 31 then nvFlag()
else if unsigned(integer) > max_integer then nvFlag()
else if (fractional != zeros()) then nxFlag()
else zeros();

Expand Down

0 comments on commit 2921faf

Please sign in to comment.