target/riscv: fix memory access result type checker function return in case of assertion
Fix memory access result type checker return in case of assertion Signed-off-by: Farid Khaydari <f.khaydari@syntacore.com>
This commit is contained in:
parent
f51900b4a2
commit
c8ae081979
|
@ -3427,26 +3427,32 @@ bool is_mem_access_failed(mem_access_result_t status)
|
||||||
{
|
{
|
||||||
#define MEM_ACCESS_RESULT_HANDLER(name, kind, msg) \
|
#define MEM_ACCESS_RESULT_HANDLER(name, kind, msg) \
|
||||||
case name: return kind == MEM_ACCESS_RESULT_TYPE_FAILED;
|
case name: return kind == MEM_ACCESS_RESULT_TYPE_FAILED;
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
LIST_OF_MEM_ACCESS_RESULTS
|
LIST_OF_MEM_ACCESS_RESULTS
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef MEM_ACCESS_RESULT_HANDLER
|
#undef MEM_ACCESS_RESULT_HANDLER
|
||||||
|
|
||||||
LOG_ERROR("Unknown memory access status: %d", status);
|
LOG_ERROR("Unknown memory access status: %d", status);
|
||||||
assert(false);
|
assert(false && "Unknown memory access status");
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_mem_access_skipped(mem_access_result_t status)
|
bool is_mem_access_skipped(mem_access_result_t status)
|
||||||
{
|
{
|
||||||
#define MEM_ACCESS_RESULT_HANDLER(name, kind, msg) \
|
#define MEM_ACCESS_RESULT_HANDLER(name, kind, msg) \
|
||||||
case name: return kind == MEM_ACCESS_RESULT_TYPE_SKIPPED;
|
case name: return kind == MEM_ACCESS_RESULT_TYPE_SKIPPED;
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
LIST_OF_MEM_ACCESS_RESULTS
|
LIST_OF_MEM_ACCESS_RESULTS
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef MEM_ACCESS_RESULT_HANDLER
|
#undef MEM_ACCESS_RESULT_HANDLER
|
||||||
|
|
||||||
LOG_ERROR("Unknown memory access status: %d", status);
|
LOG_ERROR("Unknown memory access status: %d", status);
|
||||||
assert(false);
|
assert(false && "Unknown memory access status");
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *mem_access_result_to_str(mem_access_result_t status)
|
const char *mem_access_result_to_str(mem_access_result_t status)
|
||||||
|
|
Loading…
Reference in New Issue