Skip to content

riscv64: Implement vector floating point rounding instructions#6920

Merged
afonso360 merged 5 commits into
bytecodealliance:mainfrom
afonso360:riscv-simd-float-round
Aug 30, 2023
Merged

riscv64: Implement vector floating point rounding instructions#6920
afonso360 merged 5 commits into
bytecodealliance:mainfrom
afonso360:riscv-simd-float-round

Conversation

@afonso360
Copy link
Copy Markdown
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
Copy Markdown

Subscribe to Label Action

cc @cfallin, @fitzgen

Details 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
Copy Markdown
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 force-pushed the riscv-simd-float-round branch from 4fa1e01 to ae39fe4 Compare August 30, 2023 18:49
@afonso360 afonso360 enabled auto-merge August 30, 2023 18:50
@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
@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