]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gas: support double-slash line comments in BPF assembly
authorJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 30 Nov 2023 07:34:09 +0000 (08:34 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Thu, 30 Nov 2023 07:48:56 +0000 (08:48 +0100)
commitdd2947e76aa285a12aa26de63a59f5fb8092ef82
tree0396fb73027f495f8637b873f75530d3577f25f4
parent0e78c95c497487aee110dbfc7ca2417b6b2e522d
gas: support double-slash line comments in BPF assembly

This patch makes the BPF assembler to support double-slash line
comments, like the llvm BPF assembler does.  At this point both
assemblers support the same commenting styles:

- Line comments preceded by # or //.
- Non-nestable block comments delimited by /* and */.

This patch also adds a couple of tests to make sure all the comment
styles work in both normal and pseudoc syntax.  The manual is also
updated to mention double-slash line comments.
gas/ChangeLog
gas/NEWS
gas/config/tc-bpf.h
gas/doc/c-bpf.texi
gas/testsuite/gas/bpf/bpf.exp
gas/testsuite/gas/bpf/comments-pseudoc.d [new file with mode: 0644]
gas/testsuite/gas/bpf/comments-pseudoc.s [new file with mode: 0644]
gas/testsuite/gas/bpf/comments.d [new file with mode: 0644]
gas/testsuite/gas/bpf/comments.s [new file with mode: 0644]