mirror of
https://github.com/rdolbeau/VexRiscvBPluginGenerator.git
synced 2025-04-25 05:37:05 -04:00
find the 'I' of immediate even if it's not the last character
This commit is contained in:
parent
e70c7fc26b
commit
88ecadf02c
1 changed files with 5 additions and 3 deletions
8
inst.hpp
8
inst.hpp
|
@ -50,10 +50,12 @@ public:
|
|||
}
|
||||
|
||||
bool isImm(void) const {
|
||||
int indice = name.length()-1;
|
||||
if (isWord())
|
||||
return name[name.length()-2] == 'I';
|
||||
else
|
||||
return name[name.length()-1] == 'I';
|
||||
indice --;
|
||||
while ((indice > 0) && (name[indice] >= '0') && (name[indice] <= '9'))
|
||||
indice --;
|
||||
return name[indice] == 'I';
|
||||
}
|
||||
|
||||
std::string ctrlName() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue