mirror of
https://github.com/capstone-engine/capstone.git
synced 2024-12-04 12:03:26 +00:00
mips: refine getFeatureBits() to make it more clear what Mips features are supported
This commit is contained in:
parent
1ffc1b2201
commit
c36e675213
@ -205,7 +205,13 @@ static DecodeStatus DecodeBlezGroupBranch_4(MCInst *MI,
|
||||
// Hacky: enable all features for disassembler
|
||||
static uint64_t getFeatureBits(int mode)
|
||||
{
|
||||
uint64_t Bits = (uint64_t)-1; // include every features by default
|
||||
uint64_t Bits = (uint64_t)-1; // include every features at first
|
||||
|
||||
// By default we do not support Mips1
|
||||
Bits &= ~Mips_FeatureMips1;
|
||||
|
||||
// No MicroMips
|
||||
Bits &= ~Mips_FeatureMicroMips;
|
||||
|
||||
// ref: MipsGenDisassemblerTables.inc::checkDecoderPredicate()
|
||||
// some features are mutually execlusive
|
||||
@ -238,8 +244,6 @@ static uint64_t getFeatureBits(int mode)
|
||||
Bits |= Mips_FeatureMicroMips;
|
||||
Bits &= ~Mips_FeatureMips4_32r2;
|
||||
Bits &= ~Mips_FeatureMips2;
|
||||
} else {
|
||||
Bits &= ~Mips_FeatureMicroMips;
|
||||
}
|
||||
|
||||
return Bits;
|
||||
|
Loading…
Reference in New Issue
Block a user