Skip to content

Emit custom machine code #9

@N00byEdge

Description

@N00byEdge

Something like the following:

fn fun() void {
    var local: u64 = undefined;
    @emit(.{
        .init = .{
            .rax = 4,
            .rcx = 5,
        },
        .bytes = .{1, 2, 3, 4},
        .clobbers = .{.rcx, .rdx},
        .post = {
            local = @fetch(.rax);
        },
    });
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions