Re: [RFC PATCH bpf-next] RV32G eBPF JIT

2019-06-26 Thread Luke Nelson
On Mon, Jun 24, 2019 at 3:11 AM Björn Töpel wrote: > > - Far branches > > These are not supported in RV64G either. > > This would be really nice to have, now that the size of BPF programs > are getting larger. I've sent out an updated version of the patch here, with support for far

Re: [RFC PATCH bpf-next] RV32G eBPF JIT

2019-06-25 Thread Luke Nelson
On Mon, Jun 24, 2019 at 9:45 AM Jiong Wang wrote: > > Looks to me 32-bit optimization is not enabled. > > If you define bpf_jit_needs_zext to return true > > bool bpf_jit_needs_zext(void) > { > return true; > } > > Then you don't need to zero high 32-bit when writing 32-bit

Re: [RFC PATCH bpf-next] RV32G eBPF JIT

2019-06-24 Thread Jiong Wang
Luke Nelson writes: > From: Luke Nelson > > This is an eBPF JIT for RV32G, adapted from the JIT for RV64G. > Any feedback would be greatly appreciated. > > It passes 359 out of 378 tests in test_bpf.ko. The failing tests are > features that are not supported right now: > - ALU64 DIV/MOD: >

Re: [RFC PATCH bpf-next] RV32G eBPF JIT

2019-06-24 Thread Björn Töpel
On Sat, 22 Jun 2019 at 00:59, Luke Nelson wrote: > > From: Luke Nelson > Yay! Thanks for working on this! Nice work! > This is an eBPF JIT for RV32G, adapted from the JIT for RV64G. > Any feedback would be greatly appreciated. > > It passes 359 out of 378 tests in test_bpf.ko. The failing

[RFC PATCH bpf-next] RV32G eBPF JIT

2019-06-21 Thread Luke Nelson
From: Luke Nelson This is an eBPF JIT for RV32G, adapted from the JIT for RV64G. Any feedback would be greatly appreciated. It passes 359 out of 378 tests in test_bpf.ko. The failing tests are features that are not supported right now: - ALU64 DIV/MOD: These require loops to emulate on