From a74578db448cd819bb1c2dcf7c67f753865536aa Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Tue, 26 Mar 2024 11:40:41 -0700 Subject: [PATCH] split fcvtmod.w.d invalid check into 2 if statements --- model/riscv_insts_zfa.sail | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model/riscv_insts_zfa.sail b/model/riscv_insts_zfa.sail index 5f9f713d4..185d9e7d8 100644 --- a/model/riscv_insts_zfa.sail +++ b/model/riscv_insts_zfa.sail @@ -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 not(unsigned(integer) > max_integer) then nvFlag() else if (fractional != zeros()) then nxFlag() else zeros();