diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2023-11-28 11:58:58 +0100 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2023-11-28 15:01:18 +0100 |
commit | 4c5f2370fd1b53d56504f28ba55277dbed2a5b69 (patch) | |
tree | f6e4b1207e3b5fbc8e3ac9dfb7a6a171376b16cd /gas/doc/c-bpf.texi | |
parent | 4a50820ee8f153265ec8ffd068618607d4be3a26 (diff) | |
download | gdb-4c5f2370fd1b53d56504f28ba55277dbed2a5b69.zip gdb-4c5f2370fd1b53d56504f28ba55277dbed2a5b69.tar.gz gdb-4c5f2370fd1b53d56504f28ba55277dbed2a5b69.tar.bz2 |
gas: change meaning of ; in the BPF assembler
The BPF assembler in clang uses semi-colon (;) to separate statements,
not to be begin line comments. This patch adapts the GNU assembler
accordingly.
Testsuite and documentation updated accordingly.
2023-11-28 Jose E. Marchesi <jose.marchesi@oracle.com>
* config/tc-bpf.c: Semicolon does not start a comment, but
separates multiple commands on a single line.
* testsuite/gas/bpf/alu-pseudoc.s: Adapt test accordingly.
* testsuite/gas/bpf/spacing-pseudoc.s: Likewise.
* testsuite/gas/bpf/offset16-overflow.s: Likewise.
* testsuite/gas/bpf/jump-relax-jump.s: Likewise.
* testsuite/gas/bpf/jump-relax-ja.s: Likewise.
* testsuite/gas/bpf/imm32-overflow.s: Likewise.
* testsuite/gas/bpf/disp32-overflow.s: Likewise.
* testsuite/gas/bpf/disp16-overflow-relax.s: Likewise.
* testsuite/gas/bpf/disp16-overflow.s: Likewise.
* doc/c-bpf.texi (BPF Special Characters): Update.
Diffstat (limited to 'gas/doc/c-bpf.texi')
-rw-r--r-- | gas/doc/c-bpf.texi | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gas/doc/c-bpf.texi b/gas/doc/c-bpf.texi index 25ae231..7ff07e9 100644 --- a/gas/doc/c-bpf.texi +++ b/gas/doc/c-bpf.texi @@ -68,11 +68,18 @@ the host endianness is used. @cindex line comment character, BPF @cindex BPF line comment character -The presence of a @samp{;} or a @samp{#} on a line indicates the start -of a comment that extends to the end of the current line. +The presence of a @samp{#} on a line indicates the start of a comment +that extends to the end of the current line. + +@cindex block comments, BPF +@cindex BPF block comments +The presence of the @samp{/*} sequence indicates the beginning of a +block (multi-line) comment, whose contents span until the next +@samp{*/} sequence. It is not possible to nest block comments. @cindex statement separator, BPF -Statements and assembly directives are separated by newlines. +Statements and assembly directives are separated by newlines and +@samp{;} characters. @node BPF Registers @section BPF Registers |