aboutsummaryrefslogtreecommitdiff
path: root/gas/doc
diff options
context:
space:
mode:
authorJose E. Marchesi <jose.marchesi@oracle.com>2023-11-18 18:12:44 +0100
committerJose E. Marchesi <jose.marchesi@oracle.com>2023-11-18 18:17:26 +0100
commit8fbb497b7202f404d8914252d44d2ee190a0e172 (patch)
treef66854caee10fdcb22186c67eedae3aebe24f1f5 /gas/doc
parent26c7a0ea380bedb86ff3b5a9ed252d8d2557a0c5 (diff)
downloadbinutils-8fbb497b7202f404d8914252d44d2ee190a0e172.zip
binutils-8fbb497b7202f404d8914252d44d2ee190a0e172.tar.gz
binutils-8fbb497b7202f404d8914252d44d2ee190a0e172.tar.bz2
gas: bpf: do not allow referring to register names as symbols in operands
2023-11-18 Jose E. Marchesi <jemarch@gnu.org> * config/tc-bpf.c (parse_bpf_register): Move before bpf_parse_name. (bpf_parse_name): Do not allow using symbols that are also register names as operands in pseudo-c syntax. * testsuite/gas/bpf/regs-for-symbols-pseudoc.d: New file. * testsuite/gas/bpf/regs-for-symbols-pseudoc.s: Likewise. * testsuite/gas/bpf/regs-for-symbols-pseudoc.l: Likewise. * doc/c-bpf.texi (BPF Registers): Document that it is not possible to refer to register names as symbols in instruction operands.
Diffstat (limited to 'gas/doc')
-rw-r--r--gas/doc/c-bpf.texi7
1 files changed, 6 insertions, 1 deletions
diff --git a/gas/doc/c-bpf.texi b/gas/doc/c-bpf.texi
index bdd9fde..25ae231 100644
--- a/gas/doc/c-bpf.texi
+++ b/gas/doc/c-bpf.texi
@@ -113,7 +113,12 @@ Read-only frame pointer register.
@noindent
Note that in the Pseudo-C syntax register names are not preceded by
-@code{%} characters.
+@code{%} characters. A consequence of that is that in contexts like
+instruction operands, where both register names and expressions
+involving symbols are expected, there is no way to disambiguate
+between them. In order to keep things simple, this assembler does not
+allow to refer to symbols whose names collide with register names in
+instruction operands.
@node BPF Directives
@section BPF Directives