bpf: Fixed register parsing disambiguating with possible symbol.

This changes parse_bpf_register to detect possible symbols that start with valid
register name, however due some following characters are not.
Also changed the regs-for-symbols-pseudo.s, adding some entries that
should not error if parser is properly detecting the symbol.
This commit is contained in:
Cupertino Miranda 2023-11-21 12:26:08 +00:00
parent 54195469c1
commit 97b29a61f7
2 changed files with 7 additions and 0 deletions

View File

@ -1300,6 +1300,10 @@ parse_bpf_register (char *s, char rw, uint8_t *regno)
s += 1;
}
/* If we are still parsing a name, it is not a register. */
if (is_part_of_name (*s))
return NULL;
return s;
}

View File

@ -2,3 +2,6 @@
r2 = r3 ll
r2 = r3+1 ll
r2 = 1+r3 ll
r2 = r2d2 ll
r2 = r2d2+1 ll
r2 = 1+r2d2 ll