Author Topic: [DEV] JIT support for Firefox  (Read 6471 times)

tle

  • Hero Member
  • *****
  • Posts: 583
  • Karma: +56/-0
    • View Profile
    • Trung's Personal Website
[DEV] JIT support for Firefox
« on: April 22, 2026, 10:59:24 pm »
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 path for POWER8, POWER9 and POWER10 is fully implemented (including ION JIT, WASM SIMD, JSPI and Simulator). The BE path and POWER10 optimization are still in progress atm. 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.
« Last Edit: April 30, 2026, 08:31:30 pm by tle »
Faithful Linux enthusiast

My Raptor Blackbird

Hasturtium

  • Full Member
  • ***
  • Posts: 179
  • Karma: +10/-0
    • View Profile
Re: [DEV] JIT support for Firefox
« Reply #1 on: April 23, 2026, 04:25:23 pm »
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

  • Hero Member
  • *****
  • Posts: 522
  • Karma: +40/-0
  • Talospace Earth Orbit
    • View Profile
    • Floodgap
Re: [DEV] JIT support for Firefox
« Reply #2 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.

carlosgonz

  • Newbie
  • *
  • Posts: 20
  • Karma: +2/-0
    • View Profile
Re: [DEV] JIT support for Firefox
« Reply #3 on: April 25, 2026, 02:00:47 pm »
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.
« Last Edit: April 25, 2026, 05:58:53 pm by carlosgonz »
Blackbird  Rv1.02, Gnu Trisquel

tle

  • Hero Member
  • *****
  • Posts: 583
  • Karma: +56/-0
    • View Profile
    • Trung's Personal Website
Re: [DEV] JIT support for Firefox
« Reply #4 on: April 25, 2026, 11:09:52 pm »
@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

  • Hero Member
  • *****
  • Posts: 583
  • Karma: +56/-0
    • View Profile
    • Trung's Personal Website
Re: [DEV] JIT support for Firefox
« Reply #5 on: April 25, 2026, 11:38:14 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

  • Hero Member
  • *****
  • Posts: 583
  • Karma: +56/-0
    • View Profile
    • Trung's Personal Website
Re: [DEV] JIT support for Firefox
« Reply #6 on: April 26, 2026, 06:35:09 pm »
« Last Edit: May 03, 2026, 10:02:43 pm by tle »
Faithful Linux enthusiast

My Raptor Blackbird

carlosgonz

  • Newbie
  • *
  • Posts: 20
  • Karma: +2/-0
    • View Profile
Re: [DEV] JIT support for Firefox
« Reply #7 on: April 27, 2026, 09:06:10 pm »
Thank you tle, you are a hero!

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

tle

  • Hero Member
  • *****
  • Posts: 583
  • Karma: +56/-0
    • View Profile
    • Trung's Personal Website
Re: [DEV] JIT support for Firefox
« Reply #8 on: April 28, 2026, 06:15:41 pm »
> 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