Skip to content

aarch64: Implement lowering i128 icmp instructions#2975

Merged
cfallin merged 3 commits into
bytecodealliance:mainfrom
afonso360:aarch64-icmp
Jun 9, 2021
Merged

aarch64: Implement lowering i128 icmp instructions#2975
cfallin merged 3 commits into
bytecodealliance:mainfrom
afonso360:aarch64-icmp

Conversation

@afonso360
Copy link
Copy Markdown
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
Copy Markdown
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
afonso360 added 3 commits June 9, 2021 22:56
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