Skip to content

Commit

Permalink
add a Sstc test
Browse files Browse the repository at this point in the history
  • Loading branch information
ved-rivos committed Jan 22, 2024
1 parent 1e20dc8 commit 3cd923a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/riscv_sys_regs.sail
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ function legalize_mip(o : Minterrupts, v : xlenbits) -> Minterrupts = {
* extension, the U-mode bits. */
let v = Mk_Minterrupts(v);
let m = update_SEI(o, v.SEI());
let m = if ( not(haveSstc()) | (haveSstc() & (menvcfg.STCE() == 0b0)) ) then {
let m = if ( not(haveSstc()) | menvcfg.STCE() == 0b0 ) then {
update_STI(m, v.STI());
} else m;
let m = update_SSI(m, v.SSI());
Expand Down Expand Up @@ -745,7 +745,7 @@ function lower_mie(m : Minterrupts, d : Minterrupts) -> Sinterrupts = {
function lift_sip(o : Minterrupts, d : Minterrupts, s : Sinterrupts) -> Minterrupts = {
let m : Minterrupts = o;
let m = if d.SSI() == 0b1 then update_SSI(m, s.SSI()) else m;
let m = if d.STI() == 0b1 & (not(haveSstc()) | (haveSstc() & menvcfg.STCE() == 0b0)) then {
let m = if d.STI() == 0b1 & (not(haveSstc()) | menvcfg.STCE() == 0b0) then {
update_STI(m, s.STI());
} else m;
if haveNExt() then {
Expand Down
Binary file added test/riscv-tests/rv64si-p-stimecmp.elf
Binary file not shown.

0 comments on commit 3cd923a

Please sign in to comment.