Assembly

    test.zig

    Dissecting the syntax:

    For i386 and x86_64 targets, the syntax is AT&T syntax, rather than the more popular Intel syntax. This is due to technical constraints; assembly parsing is provided by LLVM and its support for Intel syntax is buggy and not well tested.

    Output constraints are still considered to be unstable in Zig, and so and GCC documentation must be used to understand the semantics.

    Note that some breaking changes to output constraints are planned with .

    Input constraints are still considered to be unstable in Zig, and so LLVM documentation and must be used to understand the semantics.

    Clobbers are the set of registers whose values will not be preserved by the execution of the assembly code. These do not include output or input registers. The special clobber value of means that the assembly causes writes to arbitrary undeclared memory locations - not only the memory pointed to by a declared indirect output.

    Failure to declare the full set of clobbers for a given inline assembly expression is unchecked Undefined Behavior.

    When an assembly expression occurs in a top level block, this is global assembly.

    global-asm.zig