Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Clic test hotfix - wrong expect-illegal handling in ex.handler #2247

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cv32e40s/tests/programs/custom/clic/clic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2329,6 +2329,7 @@ uint32_t rw_mscratchcsw_illegal(uint32_t index, uint8_t report_name) {
__asm__ volatile (R"( csrrc zero, mstatus, %[rs1])"
:: [rs1] "r"(mstatus_rval.raw):);

*g_expect_illegal = 1;
__asm__ volatile (R"( csrrs %[rd], 0x348, sp)"
: [rd] "=r"(reg_backup_1) ::);
test_fail += (uint8_t)((*g_expect_illegal ? 1 : 0));
Expand Down Expand Up @@ -3153,7 +3154,7 @@ __attribute__((interrupt("machine"))) void u_sw_irq_handler(void) {
}

if (mcause.clic.interrupt == 0 && mcause.clic.exccode == 2) {
*g_expect_illegal = 0;
(*g_expect_illegal)--;
increment_mepc(0);
return;
}
Expand Down