Skip to content

Commit

Permalink
Merge pull request #2212 from silabs-hfegran/dev_hf_clear_minhv_clic_…
Browse files Browse the repository at this point in the history
…test

Explicitly clear minhv at the end of mret_after_minhv test
  • Loading branch information
silabs-robin authored Sep 26, 2023
2 parents 2306dfb + e8e91ae commit 2e0b55a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cv32e40s/tests/programs/custom/clic/clic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2721,6 +2721,13 @@ uint32_t mret_with_minhv(uint32_t index, uint8_t report_name) {
:[mcause] "r"(mcause.raw)
:"t0");

// Clear minhv-bit
mcause.clic.minhv = 0;

__asm__ volatile (R"(
csrrw zero, mcause, %[mcause]
)"::[mcause] "r"(mcause.raw));

test_fail += (result != 0);

if (test_fail) {
Expand Down

0 comments on commit 2e0b55a

Please sign in to comment.