-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
On aarch64 zig compiler codebase outline atomics do not seem to be used #21673
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
Comments
cc: @devins2518 #11828 might be a helpful PR but I'm too new to zig/zig compiler to understand who might know how to resolve this. Maybe the zig compiler needs to be compiled with a particular switch ? |
You need to compile Zig with the |
@Rexicon226 Thank you ! That was helpful. I compiled the the zig compiler itself by doing:
Now I can see Now, it would be great if the compiler I just obtained above by default compiles zig programs with LSE and assuming arm v8.3a -- or do I need to specify that manually... investigating |
How the compiler was built will not affect the binaries it outputs. Followup questions would be:
|
Yes, my CPU supports LSE. On my machine, I need to explictly say However, it would be better if I get outline atomics -- by looking at the auxv the zig executable should automatically choose between LSE and non-LSE modes. |
Somewhat worryingly, when I try to build zig the compiler with a zig compiler that I built using
|
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
When looking at the disassembly of e.g.
workerAstGenFile
in the zig compiler binary, I see plenty of "old style" atomic instructions.Expected Behavior
If outline atomics were being used, I'd see modern LSE version of the above instructions also... unfortunately they don't seem to be there.
How can I ensure that (a) The zig compiler codebase and (b) the executables the zig compiler compiles, always have either LSE atomics or outline atomics so that LSE atomics are always chosen ?
The text was updated successfully, but these errors were encountered: