All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <alexei.starovoitov@gmail.com>
To: Jakub Kicinski <kubakici@wp.pl>
Cc: xdp-newbies@vger.kernel.org, yhs@fb.com
Subject: Re: BPF assembler?
Date: Wed, 30 Aug 2017 21:37:56 -0700	[thread overview]
Message-ID: <CAADnVQKuZSc3bzMSmsCZB1FLnmywOEhMECSu_yruCD+exq81Sw@mail.gmail.com> (raw)

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 ;)

             reply	other threads:[~2017-08-31  4:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31  4:37 Alexei Starovoitov [this message]
2017-08-31  5:32 ` BPF assembler? Y Song
2017-08-31 18:19   ` Zvi Effron
  -- strict thread matches above, loose matches on Subject: below --
2017-08-31  4:06 Jakub Kicinski
2017-08-31  4:14 ` Alexei Starovoitov
2017-08-31  4:24   ` Jakub Kicinski
2017-08-31  4:58   ` David Miller

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=CAADnVQKuZSc3bzMSmsCZB1FLnmywOEhMECSu_yruCD+exq81Sw@mail.gmail.com \
    --to=alexei.starovoitov@gmail.com \
    --cc=kubakici@wp.pl \
    --cc=xdp-newbies@vger.kernel.org \
    --cc=yhs@fb.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.