Skip to content

C ABI for small tags is incorrect #7142

Open
@bhansconnect

Description

@bhansconnect

If a tag is small, The c-abi has us pass multiple values in a single register. This really happens with any aggregate.

For example Task U8 {} should be passed to the platform in a single register. Roc is always passing it in two registers as if it was a larger type.

Read this full thread for real context: https://roc.zulipchat.com/#narrow/stream/395097-compiler-development/topic/tags.20and.20c.20abi

Also this repo and commit should be a relatively small repro: https://github.com/jared-cone/roc-zig/tree/c72f6d79063302f18c9dcd9cc8747d0e7ce97117

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcode genGenerating machine codeintermediate issueLikely good for someone who has completed a few other issuesllvmRelates to LLVM backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions