[BUG] NX flag not correctly triggered in specific cases
Bug Description
In some cases where an OF exception was triggered,NXin the fflags register was not set correctly.
Steps to Reproduce
.globl main
main:
    la t0, value_ft4        
    flw ft4, 0(t0)          
   
    la t1, value_ft6     
    flw ft6, 0(t1)          
    fdiv.s ft0,ft6,ft4
  
    csrr t2, fflags
.section .data
.align 4
value_ft4:
    .word 0x3f7fffff
.align 4
value_ft6:
    .word   0x7f7fffffThe log from CVA6 is as follows:
core   0: 0x0000000080002018 (0x18437053) fdiv.s  ft0, ft6, ft4
3 0x0000000080002018 (0x18437053) f 0 0xffffffff7f800000
core   0: 0x000000008000201c (0x001023f3) csrrs   t2, fflags, zero
3 0x000000008000201c (0x001023f3) x 7 0x0000000000000004The log from Spike is as follows:
core   0: 0x0000000080002018 (0x18437053) fdiv.s  ft0, ft6, ft4
core   0: 3 0x0000000080002018 (0x18437053) c1_fflags 0x0000000000000005 f0  0xffffffff7f800000
core   0: 0x000000008000201c (0x001023f3) csrrs   t2, fflags, zero
core   0: 3 0x000000008000201c (0x001023f3) x7  0x0000000000000005Note:
This issue does not require clearing the fflags register to be triggered. It is distinct from issue https://github.com/pulp-platform/fpu_div_sqrt_mvp/issues/15, which has already been resolved. In my current environment, the previous issue is no longer reproducible.
Below is the cva6 log of the previous issue running in my environment:
core   0: 0x0000000080002014 (0x000e3107) fld     ft2, 0(t3)
3 0x0000000080002014 (0x000e3107) f 2 0x000000000828d569
core   0: 0x0000000080002018 (0x1a1172d3) fdiv.d  ft5, ft2, ft1
3 0x0000000080002018 (0x1a1172d3) f 5 0x8000000000000000
core   0: 0x000000008000201c (0x001023f3) csrrs   t2, fflags, zero
3 0x000000008000201c (0x001023f3) x 7 0x0000000000000003