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.
diff --git a/gas/config/tc-bpf.c b/gas/config/tc-bpf.c
index 45abc3c..b6b1db4 100644
--- a/gas/config/tc-bpf.c
+++ b/gas/config/tc-bpf.c
@@ -1300,6 +1300,10 @@
s += 1;
}
+ /* If we are still parsing a name, it is not a register. */
+ if (is_part_of_name (*s))
+ return NULL;
+
return s;
}
diff --git a/gas/testsuite/gas/bpf/regs-for-symbols-pseudoc.s b/gas/testsuite/gas/bpf/regs-for-symbols-pseudoc.s
index 693787d..9b75f27 100644
--- a/gas/testsuite/gas/bpf/regs-for-symbols-pseudoc.s
+++ b/gas/testsuite/gas/bpf/regs-for-symbols-pseudoc.s
@@ -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