Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions arch/RISCV/RISCVBaseInfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ typedef struct {
unsigned value;
bool isFractional;
} VLMULDecodeResult;

VLMULDecodeResult decodeVLMUL(RISCVII_VLMUL VLMUL)
{
switch (VLMUL) {
default:
CS_ASSERT(0 && "Unexpected LMUL value!");
break;
case RISCVII_LMUL_1:
case RISCVII_LMUL_2:
case RISCVII_LMUL_4:
Expand All @@ -61,6 +63,8 @@ VLMULDecodeResult decodeVLMUL(RISCVII_VLMUL VLMUL)
return result;
}
}
VLMULDecodeResult result = { .value = 0, .isFractional = false };
return result;
}

void printVType(unsigned VType, SStream *OS)
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/riscv_op_count_iter.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ static bool test_riscv_op_count_no_stale()
static const int32_t expected_op_counts[] = { 2, 3, 2 };

csh handle;
cs_open(CS_ARCH_RISCV, CS_MODE_RISCV64 | CS_MODE_RISCV_C, &handle);
if (cs_open(CS_ARCH_RISCV, CS_MODE_RISCV64 | CS_MODE_RISCV_C,
&handle) != CS_ERR_OK) {
return false;
}
cs_option(handle, CS_OPT_DETAIL, CS_OPT_ON | CS_OPT_DETAIL_REAL);
cs_option(handle, CS_OPT_SYNTAX,
CS_OPT_SYNTAX_NO_ALIAS_TEXT |
Expand Down
Loading