Add sb (= r9) alias to arm assembler (#2260)

This commit is contained in:
Florian Märkl 2022-01-28 16:58:35 +01:00 committed by GitHub
parent 6df2fbd1a4
commit bbe3c0724d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -615,7 +615,7 @@ static char *getrange(char *s) {
static int getreg(const char *str) {
int i;
char *ep;
const char *aliases[] = { "sl", "fp", "ip", "sp", "lr", "pc", NULL };
const char *aliases[] = { "sb", "sl", "fp", "ip", "sp", "lr", "pc", NULL };
if (!str || !*str) {
return -1;
}
@ -630,7 +630,7 @@ static int getreg(const char *str) {
}
for (i = 0; aliases[i]; i++) {
if (!strcmpnull(str, aliases[i])) {
return 10 + i;
return 9 + i;
}
}
return -1;

View file

@ -9,6 +9,7 @@ a "bl -0x2a" fff7e9ff
d "bl 0xffffffd6" fff7e9ff
ad "mov fp, r1" 8b46
a "mov r9, r1" 8946
ad "mov sb, r1" 8946
a "mov r4, r1" 0c46
ad "add sp, 0x10" 04b0
a "add sp, 0x16" 0df1160d