From: Vineet Gupta <vineet.gupta@linux.dev>
To: bot+bpf-ci@kernel.org, bpf@vger.kernel.org
Cc: bpf@gcc.gnu.org, jose.marchesi@oracle.com, ast@kernel.org,
eddyz87@gmail.com, yonghong.song@linux.dev, andrii@kernel.org,
daniel@iogearbox.net, martin.lau@kernel.org, clm@meta.com,
ihor.solodrai@linux.dev
Subject: Re: [PATCH 1/2] bpf, doc: Clarify Pseudo-C notation and w vs r register usage
Date: Wed, 1 Apr 2026 11:10:34 -0700 [thread overview]
Message-ID: <80001ed3-38c8-4be1-bdd6-c65038d67436@linux.dev> (raw)
In-Reply-To: <73bde149f01fb8fc326b756ffbd51ba42d83b443880afa2854e75eff79c800d7@mail.kernel.org>
On 4/1/26 10:59 AM, bot+bpf-ci@kernel.org wrote:
>> +Note: BPF ISA is unique as it uses "Pseudo-C" notation for the assembly
>> + instructions. In the table below, the column name actually specifies
>> + the encodings. Assembly instructions (as generated by compilers) are
> Looking at the arithmetic instructions table just below, the columns are
> "name", "code", "offset", and "description". The "name" column contains
> mnemonics (ADD, SUB, MUL, etc.) while the "code" column has the actual
> numeric encodings (0x0, 0x1, 0x2, etc.).
My understanding is that the ISA itself is specified in Pesudo-C
assembly and formally lacks mnemonics which in a conventional ISA would
would refer to the "operator" of an instruction, spelled out in English.
> Does "the column name actually specifies the encodings" refer to the
> column titled "name"?
Yes that's what I meant.
> If so, those are mnemonic names rather than
> encodings. The numeric encodings are in the "code" column. Could this
> be reworded to avoid conflating mnemonics with encodings?
I can omit this part if this is controversial or non agreeable.
>> + specified in the description column for some cases. Description of
>> + ``?DIV``, ``?MOD`` includes additional logic part of semantics not
>> + actual assembly.
> The "?DIV" and "?MOD" notation appears to use '?' as a wildcard to
> match both DIV/SDIV and MOD/SMOD, but this convention is not defined
> anywhere in the document. Would it be clearer to spell these out
> explicitly, e.g. "DIV/SDIV" and "MOD/SMOD"?
OK.
> Also, "includes additional logic part of semantics not actual assembly"
> reads a bit rough. Perhaps something like "includes additional semantic
> logic, not actual assembly" would be clearer.
OK.
Thx,
-Vineet
next prev parent reply other threads:[~2026-04-01 18:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 17:01 [PATCH 0/2] BPF documentation improvements Vineet Gupta
2026-04-01 17:01 ` [PATCH 1/2] bpf, doc: Clarify Pseudo-C notation and w vs r register usage Vineet Gupta
2026-04-01 17:59 ` bot+bpf-ci
2026-04-01 18:10 ` Vineet Gupta [this message]
2026-04-01 17:01 ` [PATCH 2/2] bpf, doc: Improve MOV* documentation Vineet Gupta
2026-04-01 17:59 ` bot+bpf-ci
2026-04-01 18:28 ` Vineet Gupta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80001ed3-38c8-4be1-bdd6-c65038d67436@linux.dev \
--to=vineet.gupta@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bot+bpf-ci@kernel.org \
--cc=bpf@gcc.gnu.org \
--cc=bpf@vger.kernel.org \
--cc=clm@meta.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=ihor.solodrai@linux.dev \
--cc=jose.marchesi@oracle.com \
--cc=martin.lau@kernel.org \
--cc=yonghong.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox