[meta][Project] Porting Spidermonkey to RISC-V (RV64GC)

The RISC-V International and PLCT Lab has opened a mentorship[1] for spidermonkey porting, and now we have two interns working on porting spidermonkey to RV64GC. the status report would be here:

The weekly sync meeting can be found here:

Wei Wu - PLCT Lab is inviting you to a scheduled Zoom meeting.
Topic: Weekly Sync for Spidermonkey RISC-V Porting
Time: Sep 6, 2021 03:30 PM Singapore
Every week on Mon, 12 occurrence(s)
Sep 6, 2021 03:30 PM
Sep 13, 2021 03:30 PM
Sep 20, 2021 03:30 PM
Sep 27, 2021 03:30 PM
Oct 4, 2021 03:30 PM
Oct 11, 2021 03:30 PM
Oct 18, 2021 03:30 PM
Oct 25, 2021 03:30 PM
Nov 1, 2021 03:30 PM
Nov 8, 2021 03:30 PM
Nov 15, 2021 03:30 PM
Nov 22, 2021 03:30 PM
Please download and import the following iCalendar (.ics) files to your calendar system.
Weekly:

https://us02web.zoom.us/meeting/tZwrc-mrrjIqHdI31HSBKUm_K378SADbZlLs/ics?icsToken=98tyKuGgqD8qGdScsB6BRpw-BI-gc-nziFhfgqd0z07NMAJ4Vw7JHbEVaoFeNNrq

Join Zoom Meeting

Meeting ID: 886 4030 9076
Passcode: 992291

[1] https://mentorship.lfx.linuxfoundation.org/project/fb9e1ba6-d6ed-40b5-82b5-ee1089ef050a

1 Like

2021-08-31 ~ 2021-09-05

(copied from spidermonkey-porting)
Let’s do these task these week :

  1. native build spidermonkey on riscv64 and run regresstion tests. Log the results. (one)
  2. cross build spidermonkey (host=x86 target=riscv64) and run regresstion tests on riscv64. Log the results. (one)
  3. Get familiar with the codebase. Find out how the baseline compiler works. Write your understanding to a google doc. (all)
  4. Say hello and introduce yourself in mozilla’s chat room. (all)
  5. figure out a suit time slot for weekly meeting. (all)

9:20

Dhairya Shah [10:38 PM]

2021-09-06 ~ 2021-09-19

Wei Wu (吴伟) 9:57 PM

Actions/tasks for next one or two weeks:

  1. go through the codebase of Spidermonkey. Write documents describing the internals. Blog your doc. Submit the internal doc as patchset to mozilla codebase.
  2. search the codebase and try to duplicate the arm64 or mips64 backend of spidermonkey. Copy it to riscv64 folder/file/functions without real modifications. Try your best to pass the build and regression testing.
  3. Before you start a new task/sub-task, always google/search first.
  4. Paste your questions and findings at https://discourse.mozilla.org/c/spidermonkey/551

My Mid Term Evaluation Report noting the progress and challenges faced so far. It includes a Progress tracker that details the 6 weeks + 2 Pre Selection weeks we have worked on the project. Please do read it, and provide feedback. If anyone has any ideas on resolving the challenges I have mentioned in the report, it will be really appreciated.

Looking forward to porting the Compilers by the end of the year.

-Ninad Jangle

1 Like

I am Dhairya Shah , working on this project - Porting Spidermonkey to RISC-V , this is my Mid Term Report for the duration so far (6 weeks + 2 pre-selection weeks). It lists the progress, issues faced with fixes, logs, work to be done, errors facing currently, findings, and conclusions. Please suggest any improvements/feedback on the same. Any resolve on the challenges faced currently would be helpful.

1 Like

Hi all~
I’m Lu Yahan from PLCT Lab. I have re-started Porting Spidermonkey to RISC-V. After pr https://github.com/plctlab/gecko-dev-riscv/pull/23, Spidermonkey can run createJitRuntime successfully.

Hi, i upload a patch on https://phabricator.services.mozilla.com/D161986
I finished a base jit port.

Build config

We can build riscv64-simulator by config

# Build only the JS shell
ac_add_options --enable-application=js

# Enable optimization for speed
ac_add_options  --enable-optimize

# Disable debug checks to better match a release build of Firefox.
ac_add_options --enable-debug

# Use a separate objdir for optimized builds to allow easy
# switching between optimized and debug builds while developing.
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-opt-@CONFIG_GUESS@
ac_add_options --enable-jitspew
ac_add_options --disable-bootstrap
ac_add_options --disable-rust-simd
ac_add_options --disable-wasm-memory64
ac_add_options --enable-simulator=riscv64
ac_add_options --enable-jit

Test Status
I run jit-test and jstests locally.

jit-test: [ 9984|   33|   12|    0] 100% ======================================>| 205.6s
jstests: [44270|    2|    1| 6684] 100% ======================================>| 589.7s
jsapi-tests: 4 unexpected failures.
2 Likes