From: David Vernet <void@manifault.com>
To: Dave Thaler <dthaler1968@googlemail.com>
Cc: bpf@vger.kernel.org, bpf@ietf.org, Dave Thaler <dthaler1968@gmail.com>
Subject: Re: [PATCH bpf-next v2] bpf, docs: clarify sign extension of 64-bit use of 32-bit imm
Date: Wed, 22 May 2024 13:21:31 -0500 [thread overview]
Message-ID: <20240522182131.GA41164@maniforge> (raw)
In-Reply-To: <20240520215255.10595-1-dthaler1968@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 835 bytes --]
On Mon, May 20, 2024 at 02:52:55PM -0700, Dave Thaler wrote:
> imm is defined as a 32-bit signed integer.
>
> {MOV, K, ALU64} says it does "dst = src" (where src is 'imm') and it
> does do dst = (s64)imm, which in that sense does sign extend imm. The MOVSX
> instruction is explained as sign extending, so added the example of
> {MOV, K, ALU64} to make this more clear.
>
> {JLE, K, JMP} says it does "PC += offset if dst <= src" (where src is 'imm',
> and the comparison is unsigned). This was apparently ambiguous to some
> readers as to whether the comparison was "dst <= (u64)(u32)imm" or
> "dst <= (u64)(s64)imm" so added an example to make this more clear.
>
> v1 -> v2: Address comments from Yonghong
>
> Signed-off-by: Dave Thaler <dthaler1968@googlemail.com>
Acked-by: David Vernet <void@manifault.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: David Vernet <void@manifault.com>
To: Dave Thaler <dthaler1968@googlemail.com>
Cc: bpf@vger.kernel.org, bpf@ietf.org, Dave Thaler <dthaler1968@gmail.com>
Subject: [Bpf] Re: [PATCH bpf-next v2] bpf, docs: clarify sign extension of 64-bit use of 32-bit imm
Date: Wed, 22 May 2024 13:21:31 -0500 [thread overview]
Message-ID: <20240522182131.GA41164@maniforge> (raw)
Message-ID: <20240522182131.WvMja-a4O-GRVT9kEzEEt1B2nl8BvQNOUjFepzwhIwo@z> (raw)
In-Reply-To: <20240520215255.10595-1-dthaler1968@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 835 bytes --]
On Mon, May 20, 2024 at 02:52:55PM -0700, Dave Thaler wrote:
> imm is defined as a 32-bit signed integer.
>
> {MOV, K, ALU64} says it does "dst = src" (where src is 'imm') and it
> does do dst = (s64)imm, which in that sense does sign extend imm. The MOVSX
> instruction is explained as sign extending, so added the example of
> {MOV, K, ALU64} to make this more clear.
>
> {JLE, K, JMP} says it does "PC += offset if dst <= src" (where src is 'imm',
> and the comparison is unsigned). This was apparently ambiguous to some
> readers as to whether the comparison was "dst <= (u64)(u32)imm" or
> "dst <= (u64)(s64)imm" so added an example to make this more clear.
>
> v1 -> v2: Address comments from Yonghong
>
> Signed-off-by: Dave Thaler <dthaler1968@googlemail.com>
Acked-by: David Vernet <void@manifault.com>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 88 bytes --]
--
Bpf mailing list -- bpf@ietf.org
To unsubscribe send an email to bpf-leave@ietf.org
next prev parent reply other threads:[~2024-05-22 18:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 21:52 [PATCH bpf-next v2] bpf, docs: clarify sign extension of 64-bit use of 32-bit imm Dave Thaler
2024-05-20 21:52 ` [Bpf] " Dave Thaler
2024-05-21 2:20 ` Yonghong Song
2024-05-21 2:20 ` [Bpf] " Yonghong Song
2024-05-22 18:21 ` David Vernet [this message]
2024-05-22 18:21 ` David Vernet
2024-05-25 17:50 ` patchwork-bot+netdevbpf
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=20240522182131.GA41164@maniforge \
--to=void@manifault.com \
--cc=bpf@ietf.org \
--cc=bpf@vger.kernel.org \
--cc=dthaler1968@gmail.com \
--cc=dthaler1968@googlemail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.