Re: [PATCH bpf-next] m68k, bpf: Add initial BPF JIT compiler support

Eero Tamminen <[email protected]>
Newsgroups org.kernel.vger.linux-m68k,org.kernel.vger.bpf
Message-ID <[email protected]>
Hi,

On 4/29/26 4:51 PM, Daniel Palmer wrote:
> On Wed, 29 Apr 2026 at 21:41, Kuan-Wei Chiu <[email protected]> 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.
>>
>> Tested with the test_bpf.ko:
>> test_bpf: Summary: 1053 PASSED, 0 FAILED, [1041/1041 JIT'ed]
>> test_bpf: test_tail_calls: Summary: 10 PASSED, 0 FAILED, [10/10 JIT'ed]
> 
> Cool! Which CPUs did you test on? I guess 040 that is in QEMU?
> I'll check on real 030, 040 and 060 machines a bit later.
Before real 030 HW testing, I would recommend checking first that things 
work well with Hatari emulator.  Unlike Qemu, it emulates also CPU 
caches, so it can find issues related to that, and it provides much 
easier debugging and (semi-cycle-accurate) profiling support.

Instructions for doing that are in the Hatari repo (GitHub mirror):
https://github.com/hatari/hatari/blob/main/doc/m68k-linux.txt

New enough Hatari release is in Fedora, Ubuntu 26.04, Debian testing...

(If you have any questions, you can mail me directly.)


	- Eero

PS. Another alternative for semi-cycle-accurate 030/cache/MMU emulation 
would be WinUAE Amiga emulator (which is upstream for the Hatari CPU 
core emulation).  I don't have any instructions for that though.

PPS. Hatari emulator has been used e.g. to profile & optimize ScummVM 
and its game engines enough that upstream ScummVM releases include Atari 
version which works to some extent even on original 030 machines (and 
naturally much better on accelerated machines):
	https://www.atari-forum.com/viewtopic.php?t=42429
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.