mirror of
https://github.com/capstone-engine/capstone.git
synced 2025-02-08 15:18:30 +00:00
Fixed SME index alias printing issue.
This commit is contained in:
parent
215822fde7
commit
483f14a920
@ -26277,6 +26277,7 @@ static char *printAliasInstr(MCInst *MI, SStream *OS, MCRegisterInfo *MRI)
|
||||
++I;
|
||||
}
|
||||
|
||||
bool isSME = false;
|
||||
do {
|
||||
if (AsmString[I] == '$') {
|
||||
++I;
|
||||
@ -26289,9 +26290,19 @@ static char *printAliasInstr(MCInst *MI, SStream *OS, MCRegisterInfo *MRI)
|
||||
printOperand(MI, (unsigned)(AsmString[I++]) - 1, OS);
|
||||
} else {
|
||||
if (AsmString[I] == '[') {
|
||||
set_mem_access(MI, true);
|
||||
if (AsmString[I-1] != ' '){
|
||||
set_sme_index(MI, true);
|
||||
isSME = true;
|
||||
} else {
|
||||
set_mem_access(MI, true);
|
||||
}
|
||||
} else if (AsmString[I] == ']') {
|
||||
set_mem_access(MI, false);
|
||||
if (isSME) {
|
||||
set_sme_index(MI, false);
|
||||
isSME = false;
|
||||
} else {
|
||||
set_mem_access(MI, false);
|
||||
}
|
||||
}
|
||||
SStream_concat1(OS, AsmString[I++]);
|
||||
}
|
||||
|
@ -768,6 +768,7 @@ for line in lines:
|
||||
++I;
|
||||
}
|
||||
|
||||
bool isSME = false;
|
||||
do {
|
||||
if (AsmString[I] == '$') {
|
||||
++I;
|
||||
@ -780,9 +781,19 @@ for line in lines:
|
||||
printOperand(MI, (unsigned)(AsmString[I++]) - 1, OS);
|
||||
} else {
|
||||
if (AsmString[I] == '[') {
|
||||
set_mem_access(MI, true);
|
||||
if (AsmString[I-1] != ' ') {
|
||||
set_sme_index(MI, true);
|
||||
isSME = true;
|
||||
} else {
|
||||
set_mem_access(MI, true);
|
||||
}
|
||||
} else if (AsmString[I] == ']') {
|
||||
set_mem_access(MI, false);
|
||||
if (isSME) {
|
||||
set_sme_index(MI, false);
|
||||
isSME = false;
|
||||
} else {
|
||||
set_mem_access(MI, false);
|
||||
}
|
||||
}
|
||||
SStream_concat1(OS, AsmString[I++]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user