Skip to content

cmov: use ASM XOR for equality comparisons #920

Closed

Description

@brxken128

This is how we originally did equality comparisons for x86, but for some reason #[inline(always)] caused it to break entirely.

I'd prefer to do the XOR within the ASM block as it's just more consistent, and I'll work on testing this out later today.

Activity

  1. tarcieri commented on Jun 25, 2023

    @tarcieri
    Member

    We should probably stop using #[inline(always)]: rust-lang/stdarch#306

  2. brxken128 commented on Jul 5, 2023

    @brxken128
    ContributorAuthor

    We should probably stop using #[inline(always)]: rust-lang/stdarch#306

    And change to just #[inline]? I thought this was best practice anyway, as LLVM/whatever will decide the rest.

  3. tarcieri commented on Jul 8, 2023

    @tarcieri
    Member

    Our main usage of #[inline(always)] before was as an alternative to #[target_feature] (which mandates the annotated function must be unsafe), but this lead to a lot of hard-to-debug codegen-related issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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