chipsalliance / riscv-dv

Random instruction generator for RISC-V processor verification
Apache License 2.0
1.02k stars 328 forks source link

Push/pop GPR routine fixes #906

Closed hcallahan-lowrisc closed 2 years ago

hcallahan-lowrisc commented 2 years ago

The push/pop_gpr routines currently do not work with the (cfg.enable_nested_interrupt) code as the user stack pointer gets overwritten. Change the routines to push the USP to the kernel stack, then pop it back off when restoring program state. Also see https://github.com/lowRISC/ibex/pull/1875

GregAC commented 2 years ago

@weicaiyang PTAL