Re: Encoding of V4 32-bit JA

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Sun, 2023-07-23 at 21:14 +0200, Jose E. Marchesi wrote:
>> > On Fri, 2023-07-21 at 18:19 +0200, Jose E. Marchesi wrote:
>> > > Hi Yonghong.
>> > > 
>> > > This is from the v4 instructions proposal:
>> > > 
>> > >     ========  =====  =========================  ============
>> > >     code      value  description                notes
>> > >     ========  =====  =========================  ============
>> > >     BPF_JA    0x00   PC += imm                  BPF_JMP32 only
>> > > 
>> > > Is this instruction using source 1 instead of 0?  Otherwise, it would
>> > > have exactly the same encoding than the V3< JA instruction.  Is that
>> > > what is intended?
>> > > 
>> > > TIA.
>> > > 
>> > 
>> > Hi Jose,
>> > 
>> > I think that assumption is that `BPF_JMP32 | BPF_JA` is currently free:
>> > - documentation [1] implies that only `BPF_JMP` should be used for `BPF_JA`
>> >   (see "notes" column for the first line)
>> > - BPF verifier rejects `BPF_JMP32 | BPF_JA`
>> > - clang always generates `BPF_JMP | BPF_JA`
>> 
>> Makes sense, thanks for the info.
>> 
>> Do you know the precise pseudo-c assembly syntax to use for this
>> instruction?
>
> In [1] Yonghong uses the following form:
>
>   gotol +0xcd9b
>
> But it seems to be not specified in the documentation for the patch-set v3.

I will use that syntax in binutils for now.

> [1] https://reviews.llvm.org/D144829
>
>> 
>> > Thanks,
>> > Eduard
>> > 
>> > [1] https://www.kernel.org/doc/html/latest/bpf/instruction-set.html#jump-instructions





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux