From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 630582D12ED for ; Wed, 1 Apr 2026 18:10:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775067045; cv=none; b=nAeddAblMAwsF+dW5Ir57tMiPvMjgOLuw7DeZUyYVcBn7GOTYKwhQ9Bh70d78MgZ2tUYyyKkT2iCRU7pAubIAT6lNtPPwypMA+3JT4Lusdk8qdWCSjCjkSH7eFYHa+l6bI0anLm1k/Ik3BNRYh2T1OQmGHNzjPNqL3VdG6NfUlQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775067045; c=relaxed/simple; bh=pvmdQLjUnGI0fCo6wE6hf1Vy6GbdsiXTg+g0x2Lr1v0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Uf5Fm5VxaiqPUFUwMvyGcRiZSuACfmNQafuQ62EUsvKYHe78WIlhdJMxdjnoXxC8Gt4zZbu5tNcxXMIyZqXJJlp1LU6xkA1WPsSBzWVnvfRW8q71MWE34FADf4M9yJJjuxErYLrTg9qfV3OfmFABLXo5gjXYZtv+xJ4srm2RT74= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ZMhrqq1+; arc=none smtp.client-ip=91.218.175.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ZMhrqq1+" Message-ID: <80001ed3-38c8-4be1-bdd6-c65038d67436@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1775067041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6NnBSo7ZxqQn1P91UGWvRV8ik0ZOjo0e9ITg9maSRPQ=; b=ZMhrqq1+vqSMCCp+Lql+9wvMimtaafrGcfIyjSkbTxmiv0CVcPTe/iKoWcHyQ2gt4R8bvK i1JFz31FZTdYHtdXH10cm8vfcX9grlwuOUW/eT1x8PyzrCtjHaUe3DtAL6t1EA1wGQWhSH ILb9+93VgZxeunAmvp4ZDNnuTfOIa7w= Date: Wed, 1 Apr 2026 11:10:34 -0700 Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH 1/2] bpf, doc: Clarify Pseudo-C notation and w vs r register usage 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 References: <20260401170115.495836-2-vineet.gupta@linux.dev> <73bde149f01fb8fc326b756ffbd51ba42d83b443880afa2854e75eff79c800d7@mail.kernel.org> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vineet Gupta Content-Language: en-US In-Reply-To: <73bde149f01fb8fc326b756ffbd51ba42d83b443880afa2854e75eff79c800d7@mail.kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT 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