All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@fb.com>
To: David Miller <davem@davemloft.net>
Cc: daniel@iogearbox.net, netdev@vger.kernel.org,
	xdp-newbies@vger.kernel.org, Yonghong Song <yhs@fb.com>
Subject: Re: [PATCH v4 binutils] Add BPF support to binutils...
Date: Fri, 5 May 2017 11:24:19 -0700	[thread overview]
Message-ID: <bf3b6bde-d159-c6a3-a532-83cccb1833d9@fb.com> (raw)
In-Reply-To: <33505cff-f730-ebac-c2d7-38f1793062b7@fb.com>

On 5/1/17 8:49 PM, Alexei Starovoitov wrote:
> On 4/30/17 9:07 AM, David Miller wrote:
>> This is mainly a synchronization point, I still need to look
>> more deeply into Alexei's -g issue.
>>
>> New in this version from v3:
>>  - Remove tailcall from opcode table
>>  - Rearrange relocations so that numbers match with LLVM ones
>>  - Emit relocs properly so that dwarf2 debug info tests pass
>>  - Handle negative load/store offsets properly, add tests
>>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> dwarf on little endian works now :)

Yonghong fixed llvm bug with big-endian dwarf [1]
and binutils worked out of the box :)

$ ./bin/clang -O2 -target bpfeb -c -g test.c
$ /w/binutils-gdb/bld/binutils/objdump -S test.o

test.o:     file format elf64-bpfbe

Disassembly of section .text:
0000000000000000 <bpf_prog1>:
int bpf_prog1(void *ign)
{
   volatile unsigned long t = 0x8983984739ull;
    0:	18 10 00 00 83 98 47 39 	ldimm64	r1, 590618314553
    8:	00 00 00 00 00 00 00 89
   10:	7b a1 ff f8 00 00 00 00 	stdw	[r10+-8], r1
   return *(unsigned long *)((0xffffffff8fff0002ull) + t);
   18:	79 1a ff f8 00 00 00 00 	lddw	r1, [r10+-8]

[1]
https://reviews.llvm.org/rL302265

WARNING: multiple messages have this Message-ID (diff)
From: Alexei Starovoitov <ast@fb.com>
To: David Miller <davem@davemloft.net>
Cc: <daniel@iogearbox.net>, <netdev@vger.kernel.org>,
	<xdp-newbies@vger.kernel.org>, Yonghong Song <yhs@fb.com>
Subject: Re: [PATCH v4 binutils] Add BPF support to binutils...
Date: Fri, 5 May 2017 11:24:19 -0700	[thread overview]
Message-ID: <bf3b6bde-d159-c6a3-a532-83cccb1833d9@fb.com> (raw)
In-Reply-To: <33505cff-f730-ebac-c2d7-38f1793062b7@fb.com>

On 5/1/17 8:49 PM, Alexei Starovoitov wrote:
> On 4/30/17 9:07 AM, David Miller wrote:
>> This is mainly a synchronization point, I still need to look
>> more deeply into Alexei's -g issue.
>>
>> New in this version from v3:
>>  - Remove tailcall from opcode table
>>  - Rearrange relocations so that numbers match with LLVM ones
>>  - Emit relocs properly so that dwarf2 debug info tests pass
>>  - Handle negative load/store offsets properly, add tests
>>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> dwarf on little endian works now :)

Yonghong fixed llvm bug with big-endian dwarf [1]
and binutils worked out of the box :)

$ ./bin/clang -O2 -target bpfeb -c -g test.c
$ /w/binutils-gdb/bld/binutils/objdump -S test.o

test.o:     file format elf64-bpfbe

Disassembly of section .text:
0000000000000000 <bpf_prog1>:
int bpf_prog1(void *ign)
{
   volatile unsigned long t = 0x8983984739ull;
    0:	18 10 00 00 83 98 47 39 	ldimm64	r1, 590618314553
    8:	00 00 00 00 00 00 00 89
   10:	7b a1 ff f8 00 00 00 00 	stdw	[r10+-8], r1
   return *(unsigned long *)((0xffffffff8fff0002ull) + t);
   18:	79 1a ff f8 00 00 00 00 	lddw	r1, [r10+-8]

[1]
https://reviews.llvm.org/rL302265

  parent reply	other threads:[~2017-05-05 18:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-30 16:07 [PATCH v4 binutils] Add BPF support to binutils David Miller
2017-05-01 17:22 ` Aaron Conole
2017-05-01 17:42   ` David Miller
2017-05-01 17:52   ` David Miller
2017-05-01 18:39     ` Aaron Conole
2017-05-01 18:50       ` David Miller
2017-05-02  3:49 ` Alexei Starovoitov
2017-05-02  3:49   ` Alexei Starovoitov
2017-05-02  3:51   ` David Miller
2017-05-05 19:43     ` David Miller
2017-05-05 18:24   ` Alexei Starovoitov [this message]
2017-05-05 18:24     ` Alexei Starovoitov
2017-05-05 18:53     ` 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=bf3b6bde-d159-c6a3-a532-83cccb1833d9@fb.com \
    --to=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --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.