Porting SpiderMonkey to LoongArch64

Hi,

I’m from Loongson Technology (R & D CPU), and we have developed a new RISC ISA named LoongArch. We want to add loongarch64 support in SpiderMonkey.

Now we have ported spidermonkey v97 to Linux/LoongArch64 platform, without wasm-simd support. Now loongarch64 port can pass almost all jit-test and jstests, except that jit-test ion/bug1433496.js will crash due to lack of spectre-mitigations support.
This is the optimized debug build loong64-simulator tests result:

And after my cleanup work, I will try to submit the patch to mozilla-central repo.
Now I have filed a meta bug to keep track of LoongArch64’s porting work, welcome to cc, and any advice is appreciated!

Thanks!
Zhao Jiazhong

5 Likes

Very exiting, thank you for sharing!

Very good news! Thank your for upstreaming.

@codehag @lazyparser Thanks for reply!
And I have submitted the full patch to phabricator at D134285, welcome to review!

I think we’re going to have to have an internal discussion about whether/how to accept a new architecture into the tree, as this is a fairly big deal - it affects everyone. That discussion probably won’t happen until the new year, as people are away now. After that, we’re also going to have to assign reviewers for the various parts of the tree. I see we have a scheduled team meeting on Jan 12, so if we don’t get to it before then we could at least discuss it at that meeting.

In the mean time, as time allows, it would be good if you could update the patch occasionally so that it is current with the tree and passes tests.

–lars

Ok, I will keep update the patch, hope to have good news.

And happy holidays!

Now we have ported spidermonkey v97 to Linux/LoongArch64 platform, without wasm-simd support. Now loongarch64 port can pass almost all jit-test and jstests, except that jit-test ion/bug1433496.js will crash due to lack of spectre-mitigations support.

Hi my name is Oliver Propst and well I have been involved with the Mozilla community for quite some time (specially in Sweden). Now I must state that the project of your research group seems very interesting indeed and I really wish the team the best of luck with the effort going forward :slight_smile:

Hi Oliver,

Thanks for your blessing! We think Firefox and SpiderMonkey are brilliant, so we want to port them to our platform. And I would like to be more involved in the Mozilla community work in the future just like you :smile:.

Best wishes!