Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the RISC-V architecture #14

Closed
aaronfranke opened this issue Aug 30, 2021 · 11 comments
Closed

Add support for the RISC-V architecture #14

aaronfranke opened this issue Aug 30, 2021 · 11 comments
Assignees
Labels
enhancement New feature or request

Comments

@aaronfranke
Copy link

This is a low-priority feature request, but one that would make sense to be done eventually.

https://github.com/PhilipHazel/pcre2/tree/master/src/sljit

Based on the files in this folder, it seems that currently PCRE supports many architectures, including x86, ARM, PPC, MIPS, SPARC, and S390X. RISC-V is a new open source ISA supported by several Linux distros, and it would be nice if PCRE supported RISC-V.

Specifically, I am only interested in 64-bit RISC-V aka RV64 (32-bit and 128-bit exist too), and as for extensions, I recommend just supporting the general purpose extensions, so -march=rv64g (or -march=rv64gc). The abbreviation of RISC-V to just RV is very common and is the preferred option in some situations, so feel free to use that name.

@PhilipHazel
Copy link
Collaborator

Thank you for the comment. I will draw it to the attention of the JIT maintainer.

@PhilipHazel PhilipHazel added the enhancement New feature or request label Aug 30, 2021
@zherczeg
Copy link
Collaborator

Supporting more cpus never hurt. Unfortunately I don't have much time lately, so this is unlikely happen in the close future.

@zherczeg
Copy link
Collaborator

There is an experimental risc-v support in the jit compiler now. It is only tested with qemu, so there might be cache flush issues.

@carenas
Copy link
Contributor

carenas commented Dec 6, 2022

Released with PCRE2 10.41

@ljavorsk
Copy link

@PhilipHazel Could you please confirm that the RISC-V is now JIT supported since 10.41? Thank you

@PhilipHazel
Copy link
Collaborator

I cannot confirm, but @zherczeg will be able to.

@zherczeg
Copy link
Collaborator

I haven't tried it on real hw yet.

@carenas
Copy link
Contributor

carenas commented Dec 19, 2022

I did test it in two rv64g systems (thanks to the gcc compile farm) before it was released; there was one bug that was fixed before the final sync and since autodetection is enabled it is IMHO available for broader use (AFAIK it has been enabled at least in alpine linux already).

It doesn't use compressed instructions or the vector extensions, and assumes hard-float, so it is not "finished" but it should be an improvement over the interpreter in the currently supported configurations and therefore it should be enabled in distributions.

@ljavorsk
Copy link

ljavorsk commented Jan 18, 2023

I've built the new 10.42 version on RISC-V Fedora builders and the pcre2-jit test passes, which I assume should test the JIT support.

@zherczeg
Copy link
Collaborator

This is great news! Thank you for the feedback.

@aaronfranke
Copy link
Author

I haven't been able to test in Godot since we're unable to update PCRE2 for other reasons, but it sounds like everything is working great so I'll close this issue as completed. Thank you everyone!

ezequielgarcia pushed a commit to ezequielgarcia/pcre2-rpm that referenced this issue Jan 20, 2025
Update sources location (moved to Github)
RISC-V is now JIT enabled according to: PCRE2Project/pcre2#14

Resolves: #2151744
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants