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
17 changes: 8 additions & 9 deletions arch/RISCV/RISCVDisassembler.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,15 @@
*/
static uint64_t getFeatureBits(int mode)
{
if (mode == CS_MODE_RISCV32)
// return b11110
return RISCV_FeatureStdExtM | RISCV_FeatureStdExtA |
uint64_t ret = RISCV_FeatureStdExtM | RISCV_FeatureStdExtA |
RISCV_FeatureStdExtF | RISCV_FeatureStdExtD ;
else

// CS_MODE_RISCV64, return b11111
return RISCV_Feature64Bit | RISCV_FeatureStdExtM |
RISCV_FeatureStdExtA | RISCV_FeatureStdExtF |
RISCV_FeatureStdExtD ;

if (mode & CS_MODE_RISCV64)
ret |= RISCV_Feature64Bit;
if (mode & CS_MODE_RISCVC)
ret |= RISCV_FeatureStdExtC;

return ret;
}

#define GET_REGINFO_ENUM
Expand Down
2 changes: 1 addition & 1 deletion cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ static uint8_t skipdata_size(cs_struct *handle)
case CS_ARCH_RISCV:
// special compress mode
if (handle->mode & CS_MODE_RISCVC)
return 1;
return 2;
return 4;
}
}
Expand Down