All of lore.kernel.org
 help / color / mirror / Atom feed
* BPF assembler?
@ 2017-08-31  4:06 Jakub Kicinski
  2017-08-31  4:14 ` Alexei Starovoitov
  0 siblings, 1 reply; 7+ messages in thread
From: Jakub Kicinski @ 2017-08-31  4:06 UTC (permalink / raw)
  To: xdp-newbies

Hi!

Is there any way to write eBPF programs in some form of an assembly
language?

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: BPF assembler?
@ 2017-08-31  4:37 Alexei Starovoitov
  2017-08-31  5:32 ` Y Song
  0 siblings, 1 reply; 7+ messages in thread
From: Alexei Starovoitov @ 2017-08-31  4:37 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: xdp-newbies, yhs

On Wed, Aug 30, 2017 at 9:24 PM, Jakub Kicinski <kubakici@wp.pl> 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 ;)

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

end of thread, other threads:[~2017-08-31 18:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31  4:06 BPF assembler? Jakub Kicinski
2017-08-31  4:14 ` Alexei Starovoitov
2017-08-31  4:24   ` Jakub Kicinski
2017-08-31  4:58   ` David Miller
2017-08-31  4:37 Alexei Starovoitov
2017-08-31  5:32 ` Y Song
2017-08-31 18:19   ` Zvi Effron

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.