mirror of
https://github.com/rdolbeau/VexRiscvBPluginGenerator.git
synced 2025-06-28 01:07:47 -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 {
|
bool isImm(void) const {
|
||||||
|
int indice = name.length()-1;
|
||||||
if (isWord())
|
if (isWord())
|
||||||
return name[name.length()-2] == 'I';
|
indice --;
|
||||||
else
|
while ((indice > 0) && (name[indice] >= '0') && (name[indice] <= '9'))
|
||||||
return name[name.length()-1] == 'I';
|
indice --;
|
||||||
|
return name[indice] == 'I';
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ctrlName() const {
|
std::string ctrlName() const {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue