Skip to content

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

Description

@NicoElbers

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-x86_6464-bit x86backend-self-hostedbugObserved behavior contradicts documented or intended behavior

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions