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

compiler: fix ARMv8 regression introduced in #2345 #2365

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

compiler: fix ARMv8 regression introduced in #2345 #2365

wants to merge 2 commits into from

Conversation

ncruces
Copy link
Collaborator

@ncruces ncruces commented Jan 16, 2025

This is an attempt to fix the performance regression introduced in #2345 by requiring ARMv8.1 when it is only strictly needed for experimental.CoreFeaturesThreads.

When I did #2345 I was trying to fix wasilibs/go-re2#136, and assumed (from the bug description) that these processors were really uncommon. It turns out that (e.g.) RaspberryPi 3 and 4 don't support these, and neither does the original Graviton (still in use by AWS).

Also, only Linux and FreeBSD allow us to figure out if the processor is an ARMv8.1 (we assume it is for macOS and take the chance on Windows, because 11 requires it). Still, the ARM compiler works fine on NetBSD too (I test this it in SQLite, as well as the ARM FreeBSD compiler).

I'm happy to reconsider the approach if this seems confusing.

@ncruces
Copy link
Collaborator Author

ncruces commented Jan 16, 2025

I clearly need to run tests with the race detector on. Sorry about that.

@faddat
Copy link

faddat commented Jan 17, 2025

What I am thinking about #2360 is that I am going to try out this branch, and see if it changes anything, then investigate the rest.

Thanks for your responses!

Signed-off-by: Nuno Cruces <[email protected]>
@ncruces
Copy link
Collaborator Author

ncruces commented Jan 17, 2025

OK, so I guess this is ready.

This delays the determination of whether to use the compiler or interpreter to NewRuntimeWithConfig, then taking account of enabledFeatures.

Potentially amd64 could run on all x64 processors if SIMD is disabled, but I didn't go there. I'm just stating the possibility.

@ncruces ncruces marked this pull request as ready for review January 17, 2025 12:41
@ncruces ncruces requested a review from mathetake as a code owner January 17, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Illegal instruction" on an ARMv8.1 instruction set CPU.
2 participants