Skip to content

integrated assembly and intel/NASM syntax for x86 assembly #2081

@andrewrk

Description

@andrewrk

Extracted from #215 (comment).

Currently Zig relies on LLVM for assembly parsing on all targets.

It's a big project if Zig were to take on knowledge of the assembly format of every supported target, but if we were to do that, it would bring some benefits:

  • Intel/NASM syntax for x86 which is generally preferable to AT&T syntax which we are currently stuck with due to LLVM's Intel syntax support being untested and buggy.

  • Ability for tighter integration with Zig code that could do things such as automatically determining clobbers.

  • Maybe it's not so bad to reduce dependency on LLVM. This would bring us closer to a fully self hosted toolchain and make it possible to experiment with bypassing LLVM in debug mode for faster builds.

So I think this proposal is at least worth considering. There will have to be a decision before releasing 1.0.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions