Skip to content
Open
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
9 changes: 9 additions & 0 deletions tests/env/rvtest_failure_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@
failedtest_saveresults:
# Dispatch based on failure type
lw x9, failure_type
li x10, 3
beq x9, x10, failedtest_saveresults_trap # type 3: trap abort, skip register/value extraction
#if defined(F_SUPPORTED) || defined(ZFINX_SUPPORTED)
li x10, 1
beq x9, x10, failedtest_saveresults_fp
Expand Down Expand Up @@ -719,6 +721,8 @@

#endif // RVTEST_VECTOR

failedtest_saveresults_trap:
# Trap abort: no register/value extraction, fall through to common to load string pointer

failedtest_saveresults_common:
# After the jal instruction there are two XLEN-sized pointers: the instruction address and the test string pointer
Expand Down Expand Up @@ -776,6 +780,11 @@
LA(a0, newlinestr)
call rvmodel_io_write_str

# Trap abort: skip instruction/address/register/value fields, they are meaningless
lw a0, failure_type
li a1, 3
beq a0, a1, failedtest_report_traphandler

# Print failing instruction (detect 16-bit compressed vs 32-bit)
LA(a0, inststr)
call rvmodel_io_write_str
Expand Down
Loading