Skip to content
New issue

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

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

Already on GitHub? # to your account

selfhosted x86_64: no encoding found for: none imul r8 r8 none none #21950

Open
NicoElbers opened this issue Nov 10, 2024 · 0 comments
Open

selfhosted x86_64: no encoding found for: none imul r8 r8 none none #21950

NicoElbers opened this issue Nov 10, 2024 · 0 comments
Labels
arch-x86_64 64-bit x86 backend-self-hosted bug Observed behavior contradicts documented or intended behavior
Milestone

Comments

@NicoElbers
Copy link
Contributor

NicoElbers commented Nov 10, 2024

Zig Version

0.14.0-dev.2198+e5f5229fd

Steps to Reproduce and Observed Behavior

imulr8r8.zig:

export fn foo(a: i8) i8 {
    return @mod(a, 1);
}

run zig build-lib -fno-llvm -fno-lld imulr8r8.zig

observe:

error(x86_64_encoder): no encoding found for: none imul r8 r8 none none
imulr8r8.zig:1:8: error: CodeGen failed to find a viable instruction. This is a bug in the Zig compiler.
export fn foo(a: i8) i8 {
~~~~~~~^~~~~~~~~~~~~~~~

Expected Behavior

That this function compiles

@NicoElbers NicoElbers added the bug Observed behavior contradicts documented or intended behavior label Nov 10, 2024
@Vexu Vexu added this to the 0.14.0 milestone Nov 10, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
arch-x86_64 64-bit x86 backend-self-hosted bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

2 participants