Thread (7 messages) flat view 7 messages, 3 authors, 2019-05-31

Re: [PATCH 1/2] bpf, riscv: fix bugs in JIT for 32-bit ALU operations

From: Jiong Wang <hidden>
Date: 2019-05-31 07:22:57
Also in: bpf, linux-riscv, lkml

Song Liu writes:
On Thu, May 30, 2019 at 3:34 PM Luke Nelson [off-list ref] wrote:
quoted
On Thu, May 30, 2019 at 1:53 PM Song Liu [off-list ref] wrote:
quoted
This is a little messy. How about we introduce some helper function
like:

/* please find a better name... */
emit_32_or_64(bool is64, const u32 insn_32, const u32 inst_64, struct
rv_jit_context *ctx)
{
       if (is64)
            emit(insn_64, ctx);
       else {
            emit(insn_32, ctx);
           rd = xxxx;
           emit_zext_32(rd, ctx);
       }
}
This same check is used throughout the file, maybe clean it up in a
separate patch?
We also need to enable the recent 32-bit opt (on bpf-next) on these missing
insns, like what has been done at:

  https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=66d0d5a854a6625974e7de4b874e7934988b0ef8

Perhaps the best way is to wait this patch merged back to bpf-next, then we
do two patches, the first one to enable the opt, the second one then do the
re-factor. I guess this could avoid some code conflict.

Regards,
Jiong
Yes, let's do follow up patch.

Thanks,
Song
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help