[DEV] JIT support for Firefox

Started by tle, April 22, 2026, 10:59:24 PM

Previous topic - Next topic

tle

Firstly, all credits go to @ClassicHasClass for his great JIT support work for the v86 Firefox (basically baseline JIT is fully working). He had submitted the patches against upstream at https://bugzilla.mozilla.org/show_bug.cgi?id=1860412 but unfortunately the patch has become stale and no longer work with post-140ESR codebase.

So after spending 3 weeks with help from few people in the PPC community and help of AI agents to track down errors pattern (lacking of tooling like rr-debugger made the work super hard - at one stage I was resolving to all sort of blind hypothesis and nearly gave up), I have successfully revived and fixed number of bugs of the original JIT codes. Please check out https://github.com/runlevel5/firefox/pull/1 to all members here for reviewing.

TL;DR; LE and BE path for POWER8, POWER9 and POWER10 is fully implemented (including ION JIT, WASM SIMD, JSPI and Simulator). Please give JIT work a go and let me know if you happen to find any bug. I have tried my best to hand test and ran many stress test / benchmarks and have addressed quite a number of edge cases.

So what's next? Trying to get it polished as much as possible then get it upstreamed (for release 153 - why? new ESR would be branched off this version) or simply try to get the patch accepted in downstream sources like Fedora, Debian/Ubuntu.
Faithful Linux enthusiast

My Raptor Blackbird

Hasturtium

Thank you so, SO much. I've really not enjoyed using Chromium as a full-featured web browser in Fedora, and this will make a wonderful difference to my quality of life.

ClassicHasClass

Good work picking it up. Unfortunately I'm having trouble with Fedora on my Blackbird (won't DHCP through my wifi bridge), so I can't really check it right now, but I've been following the commits as they land.

carlosgonz

#3
Hi  tle

Can you share yours Power FireFox LE build to test?

Thank you for tackle Firefox for power user.



sent from ppc64be,debian-forky and netsurf browser. super kudos to rcs for unJS forum.
Blackbird  Rv1.02, Gnu Trisquel

tle

@carlosgonz I mean yes I could package the LE binary (built on Fedora 44). Btw I have not tested against Debian so unsure if the package would work or not (in theory it should)
Faithful Linux enthusiast

My Raptor Blackbird

tle

Quote from: ClassicHasClass on April 24, 2026, 09:46:48 PM
Good work picking it up. Unfortunately I'm having trouble with Fedora on my Blackbird (won't DHCP through my wifi bridge), so I can't really check it right now, but I've been following the commits as they land.

Looking forward to your feedback in the Pull Request. I will freeze the codes when Firefox team cut the 151 release then proceed with upstreaming
Faithful Linux enthusiast

My Raptor Blackbird

tle

#6
Faithful Linux enthusiast

My Raptor Blackbird

carlosgonz

Thank you tle, you are a hero!

Will this merged to next 153esr?
Blackbird  Rv1.02, Gnu Trisquel

tle

> Will this merged to next 153esr?

That's the plan. I am fixing the PPC64 Simulator on ARM64 now so the Firefox team could run the PPC64 JIT tests on their CI.
Faithful Linux enthusiast

My Raptor Blackbird

MPC7500

tle: ppc64 is POWER8+ only, no PPC970/ PA6T?

carlosgonz

Yeah ppc64 term still it is big endian, despite little endian from power8, but i not sure  what this ppc64 is meaning for our hero tle.
Blackbird  Rv1.02, Gnu Trisquel

tle

#11
Quote from: MPC7500 on May 09, 2026, 03:25:08 PM
tle: ppc64 is POWER8+ only, no PPC970/ PA6T?

Only POWER ISA 2.7+ and Little Endian only at this stage. I do plan to support Big Endian but the amount of work would be triple (POWER8, POWER9 and POWER10 fast paths all need to be carefully revised and tested).

Both BE and LE paths are supported as of Firefox 153 release

I wish I could offer support for PPC970/PA6T but lacking of real hardware would make it very hard for me to pick up many issues.
Faithful Linux enthusiast

My Raptor Blackbird

MPC7500

You could do it via QEMU. But yes, you need someone to test. Cameron has the hardware, IIRC.
But yes, it's more important to make it work on le. I dislike Chromium.

ClassicHasClass

I have a Quad G5, but it runs Tiger, and I am not likely to run Linux on it. Similarly, my POWER6 runs AIX.

MPC7500