bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bpf] Sign extension ISA question
@ 2024-01-16 20:38 dthaler1968=40googlemail.com
  2024-01-16 20:55 ` dthaler1968
  0 siblings, 1 reply; 23+ messages in thread
From: dthaler1968=40googlemail.com @ 2024-01-16 20:38 UTC (permalink / raw)
  To: bpf, bpf


[-- Attachment #1.1: Type: text/plain, Size: 323 bytes --]

Is there any semantic difference between the following two instructions?

 

{.opcode = BPF_ALU64 | BPF_MOV | BPF_K, .offset = 0, .imm = -1}

 

{.opcode = BPF_ALU64 | BPF_MOVSX | BPF_K, .offset = 32, .imm = -1}

 

>From my reading both of them treat imm as a signed 32-bit number and
sign-extend it to 64 bits.

 

Dave


[-- Attachment #1.2: Type: text/html, Size: 2092 bytes --]

[-- Attachment #2: Type: text/plain, Size: 76 bytes --]

-- 
Bpf mailing list
Bpf@ietf.org
https://www.ietf.org/mailman/listinfo/bpf

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2024-01-27  6:56 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-16 20:38 [Bpf] Sign extension ISA question dthaler1968=40googlemail.com
2024-01-16 20:55 ` dthaler1968
2024-01-16 20:55   ` [Bpf] " dthaler1968=40googlemail.com
2024-01-16 22:34   ` Yonghong Song
2024-01-16 22:34     ` [Bpf] " Yonghong Song
2024-01-17  1:56     ` dthaler1968
2024-01-17  1:56       ` [Bpf] " dthaler1968=40googlemail.com
2024-01-17  3:48       ` Yonghong Song
2024-01-17  3:48         ` [Bpf] " Yonghong Song
2024-01-24  2:07         ` Jump instructions clarification dthaler1968
2024-01-24  2:07           ` [Bpf] " dthaler1968=40googlemail.com
2024-01-24 19:33           ` Yonghong Song
2024-01-24 19:33             ` [Bpf] " Yonghong Song
2024-01-26  1:12             ` 64-bit immediate " dthaler1968
2024-01-26  1:12               ` [Bpf] " dthaler1968=40googlemail.com
2024-01-26  5:34               ` Yonghong Song
2024-01-26  5:34                 ` [Bpf] " Yonghong Song
2024-01-26 22:27                 ` dthaler1968
2024-01-26 22:27                   ` [Bpf] " dthaler1968=40googlemail.com
2024-01-27  3:41                   ` Yonghong Song
2024-01-27  3:41                     ` [Bpf] " Yonghong Song
2024-01-27  6:56                     ` dthaler1968
2024-01-27  6:56                       ` [Bpf] " dthaler1968=40googlemail.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).