Re: BPF assembler?

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

 



Would this include support for inline eBPF asm in C eBPF programs?
That would be very nice for when new instructions are added to the
kernel that have yet to be given a builtin in clang (such as the new
BPF_END instructions).

--Zvi

On Wed, Aug 30, 2017 at 10:32 PM, Y Song <ys114321@xxxxxxxxx> wrote:
> Jakub,
>
> Let me know if you need additional help on this. I think this
> assembler->obj in llvm is the last
> major piece for a complete toolchain for clang/llvm.
>
> Thanks,
>
> Yonghong
>
> On Wed, Aug 30, 2017 at 9:37 PM, Alexei Starovoitov
> <alexei.starovoitov@xxxxxxxxx> wrote:
>> On Wed, Aug 30, 2017 at 9:24 PM, Jakub Kicinski <kubakici@xxxxx> wrote:
>>>
>>>> llvm assembler is almost there too, but it needs some work.
>>>
>>> Does it use the "verifier instruction format"?  Is it available
>>> somewhere to look at?
>>
>> yes. you can use verifier instruction format.
>> That was the goal for llvm to be as close as possible to
>> kernel verifier syntax.
>> But, I think, it's fine to deviate if it makes asm code easier to read.
>> What is missing is AsmParser directory in
>> llvm/lib/Target/BPF
>> disassembler, elf tools, codegen are all there.
>> Most of the core backend components are shared in the llvm,
>> so it's only missing text parser.
>> Most backends already have assemblers:
>> ls -d lib/Target/*/AsmParser
>> To make one for BPF requires a lot of copy-paste from others ;)



[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux