-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Asm block causes compiler crash #2320
Labels
Milestone
Comments
andrewrk
added
the
bug
Observed behavior contradicts documented or intended behavior
label
Apr 21, 2019
I am not sure what you are trying to do, shouldn't your code be: const std = @import("std");
pub fn main() void {
var foo: i64 = undefined;
asm volatile (
\\ movq $12, %[foo]
: [foo] "=m" (foo)
);
std.debug.warn("{}\n", foo);
} ? Changes:
Granted, a lot of these could be caught by Zig. |
andrewrk
added
stage1
The process of building from source via WebAssembly and the C backend.
upstream
An issue with a third party project that Zig uses.
labels
Feb 10, 2020
@Sahnvour's fixed version prints 12 @tyler569's original code after fixing the last line to
|
Vexu
removed
the
stage1
The process of building from source via WebAssembly and the C backend.
label
Dec 7, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiling the following source file:
with
zig build-exe asm.zig
causes the compiler to segfault.This seems very similar to #1689, I get a similar crash deep in the LLVM weeds:
The zig compiler survives if you emit LLVM, and
lli
doesn't like that asm block when it tries to run it:I don't currently have the ability to run with a LLVM build with asserts enabled, but I can try that later tonight if that will help.
The text was updated successfully, but these errors were encountered: