Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aarch64: Implement lowering i128 icmp instructions #2975

Merged
merged 3 commits into from
Jun 9, 2021

Conversation

afonso360
Copy link
Contributor

Continuing the work on i128 ops on aarch64 here is an implementation of icmp.

I did implement emitting the sbcs instruction even though in the end I didn't end up needing it. I decided to leave it, because I'm probably going to need it eventually

Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks! As on the other i128 PR, I'll wait to merge this until after the runtest-move PR is merged and this is then updated.

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:aarch64 Issues related to AArch64 backend. labels Jun 9, 2021
We have 3 different aproaches depending on the type of comparision requested:
* For eq/ne we compare the high bits and low bits and check
  if they are equal
* For overflow checks, we perform a i128 add and check the
  resulting overflow flag
* For the remaining comparisions (gt/lt/sgt/etc...)
  We compare both the low bits and high bits, and if the high bits are
  equal we return the result of the unsigned comparision on the low bits

As with other i128 ops, we are still missing immlogic support.
@cfallin cfallin merged commit 3d56728 into bytecodealliance:main Jun 9, 2021
@afonso360 afonso360 deleted the aarch64-icmp branch June 10, 2021 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:aarch64 Issues related to AArch64 backend. cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants