Re: [PATCH bpf-next v3] m68k, bpf: Add initial BPF JIT compiler support
Kuan-Wei Chiu <[email protected]>
| Newsgroups | org.kernel.vger.linux-m68k,org.kernel.vger.bpf,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Hi Andreas, On Tue, May 12, 2026 at 07:32:44PM +0200, Andreas Schwab wrote: > On Mai 11 2026, Kuan-Wei Chiu wrote: > > > + > > + emit_16(ctx, 0x4a80 | d_lo); /* tst.l d_lo */ > > + emit_16(ctx, 0x6b04); /* bmi.s .+6 */ > > + emit_16(ctx, 0x7000 | (d_hi << 9)); /* moveq #0, d_hi */ > > + emit_16(ctx, 0x6002); /* bra.s .+4 */ > > + emit_16(ctx, 0x70ff | (d_hi << 9)); /* moveq #-1, d_hi */ > > I think this could be "tst.l d_lo; smi d_hi; extb.l d_hi". > Sorry for the late reply, and thanks for the review. This makes sense. I initially kept things simple to focus on correctness first, but since you pointed it out, I will include this optimization in the next respin. Thanks! Regards, Kuan-Wei