Re: [PATCH bpf-next v3] m68k, bpf: Add initial BPF JIT compiler support
From: Kuan-Wei Chiu
Date: Mon May 18 2026 - 13:13:18 EST
Hi greg,
On Tue, May 12, 2026 at 09:57:11PM +1000, Greg Ungerer wrote:
> Hi Kuan-Wei,
>
> On 12/5/26 07:27, Kuan-Wei Chiu wrote:
> > Add a BPF JIT compiler for the m68k architecture.
> >
> > The JIT generates m68k machine code targeting m68020+ processors. It
> > currently excludes 68000/68010 and coldfire processors, as it relies on
> > 32 bit branch displacements (b<cc>.l) to handle large bpf programs.
>
> FWIW the ColdFire ISA_B and newer instruction set extensions do support
> the 32 bit branch displacement instruction forms. So that would mean that
> at least the MMU based version 4 cores may be able to be supported
> without too much extra effort.
>
Sorry for getting back to you so late, and thanks for the info!
I haven't thoroughly checked what else the current implementation might
lack for coldfire support, but I suspect it won't be as simple as just
modifying the kconfig. For instance, at least the exg instruction I'm
currently using is not supported on coldfire.
Since the current patch is already quite large, I'm inclined to focus
on getting everything running correctly on classic m68k first. Once
this initial support is merged in-tree, we can revisit it and figure
out the necessary adjustments for coldfire.
That being said, getting coldfire supported would definitely be cool!
Regards,
Kuan-Wei