Skip to content

cranelift: Rename iadd_carry/ iadd_cout instructions  #5165

@afonso360

Description

@afonso360

👋 Hey,

While implementing iadd_cout for aarch64 I realized that the output of the carry bit depends on signedness of the operation. If we implement it as unsigned we only signal overflow on 0xFF + 1, and if we implement it as signed we signal overflow on 0x7F + 1

Thus should we rename this operation to sadd_cout to keep consistency with our other operations that depend on signedness (i.e. sdiv/udiv)? The operation seems to be signed based on the existing test suite.

Does the existence of sadd_cout also imply that we should have uadd_cout?

The same question applies for iadd_carry, but not for iadd_cin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions