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

riscv64: Implement vector floating point rounding instructions #6920

Merged
merged 5 commits into from
Aug 30, 2023

Conversation

afonso360
Copy link
Contributor

👋 Hey,

This PR Implements the floating point rounding instructions for SIMD values in the RISC-V backend. I'm not too familiar with the intricacies of this algorithm, I've mostly just copied what LLVM emits.

This PR also re-introduces CSR Instructions (deleted in #6267). CSR's are Control and Status Registers, which are used to hold architectural state such as Floating point round modes and Vector type state, etc..

Despite being part of the Zicsr extension, this extension is part of the minimum set of extensions that we need to function (i.e. it is required for floating point to work).

@afonso360 afonso360 added the cranelift:area:riscv64 Issues related to the RISC-V 64 backend. label Aug 28, 2023
@afonso360 afonso360 requested review from a team as code owners August 28, 2023 14:06
@afonso360 afonso360 requested review from cfallin and removed request for a team August 28, 2023 14:06
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language labels Aug 28, 2023
@github-actions
Copy link

Subscribe to Label Action

cc @cfallin, @fitzgen

This issue or pull request has been labeled: "cranelift", "cranelift:area:riscv64", "isle"

Thus the following users have been cc'd because of the following labels:

  • cfallin: isle
  • fitzgen: isle

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Copy link
Member

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@afonso360 afonso360 added this pull request to the merge queue Aug 30, 2023
Merged via the queue into bytecodealliance:main with commit d6b4825 Aug 30, 2023
24 checks passed
@afonso360 afonso360 deleted the riscv-simd-float-round branch August 30, 2023 20:20
eduardomourar pushed a commit to eduardomourar/wasmtime that referenced this pull request Sep 6, 2023
…odealliance#6920)

* riscv64: Add CSR Instructions

* riscv64: Add float to int vector instructions

* cranelift: Split vector rounding mode tests

* riscv64: Implement float rounding ops for vectors

* riscv64: Update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:area:riscv64 Issues related to the RISC-V 64 backend. cranelift Issues related to the Cranelift code generator isle Related to the ISLE domain-specific language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants