File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,11 +39,13 @@ typedef struct {
3939 unsigned value ;
4040 bool isFractional ;
4141} VLMULDecodeResult ;
42+
4243VLMULDecodeResult decodeVLMUL (RISCVII_VLMUL VLMUL )
4344{
4445 switch (VLMUL ) {
4546 default :
4647 CS_ASSERT (0 && "Unexpected LMUL value!" );
48+ break ;
4749 case RISCVII_LMUL_1 :
4850 case RISCVII_LMUL_2 :
4951 case RISCVII_LMUL_4 :
@@ -61,6 +63,8 @@ VLMULDecodeResult decodeVLMUL(RISCVII_VLMUL VLMUL)
6163 return result ;
6264 }
6365 }
66+ VLMULDecodeResult result = { .value = 0 , .isFractional = false };
67+ return result ;
6468}
6569
6670void printVType (unsigned VType , SStream * OS )
Original file line number Diff line number Diff line change @@ -16,7 +16,10 @@ static bool test_riscv_op_count_no_stale()
1616 static const int32_t expected_op_counts [] = { 2 , 3 , 2 };
1717
1818 csh handle ;
19- cs_open (CS_ARCH_RISCV , CS_MODE_RISCV64 | CS_MODE_RISCV_C , & handle );
19+ if (cs_open (CS_ARCH_RISCV , CS_MODE_RISCV64 | CS_MODE_RISCV_C ,
20+ & handle ) != CS_ERR_OK ) {
21+ return false;
22+ }
2023 cs_option (handle , CS_OPT_DETAIL , CS_OPT_ON | CS_OPT_DETAIL_REAL );
2124 cs_option (handle , CS_OPT_SYNTAX ,
2225 CS_OPT_SYNTAX_NO_ALIAS_TEXT |
You can’t perform that action at this time.
0 commit comments