Stream: git-wasmtime

Topic: wasmtime / PR #8582 riscv64: Add remaining Zfa Instructions


view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 12:44):

afonso360 opened PR #8582 from afonso360:riscv-remaining-zfa to bytecodealliance:main:

:wave: Hey,

This PR adds support for the remaining instructions in the Zfa extension (introduced in #8536).

The first one is fround.{s,d} that is a direct match of all of our float rounding instructions (ceil, floor, trunc, nearest) depending on how the instruction is encoded.

The second one is fli.{s,d} that loads a floating point constant from a predefined table of constants. Additionally I've also added a rule that supports loading the negated constant and then subsequently inverting the sign bit with fneg.

There are additional instructions in Zfa, but none that can be easily matched with our IR.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 12:44):

afonso360 requested cfallin for a review on PR #8582.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 12:44):

afonso360 requested wasmtime-compiler-reviewers for a review on PR #8582.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 14:44):

github-actions[bot] commented on PR #8582:

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:

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

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 15:17):

cfallin submitted PR review:

Thanks!

One thought below about Capstone but otherwise good to go :+1:

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 15:17):

cfallin submitted PR review:

Thanks!

One thought below about Capstone but otherwise good to go :+1:

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 15:17):

cfallin created PR review comment:

interesting that Capstone doesn't yet support these flis; does a newer version exist that does?

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 15:31):

afonso360 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 15:31):

afonso360 created PR review comment:

Capstone in general doesn't support any RISC-V extension, last time I checked the RISC-V support seemed a bit abandoned, but I'll go check again.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 15:40):

cfallin merged PR #8582.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 18:58):

afonso360 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 18:58):

afonso360 created PR review comment:

I had a look at the release notes for the capstone engine for the past year or so, and there aren't many RISC-V specific fixes, and none of them add any extensions :disappointed:

view this post on Zulip Wasmtime GitHub notifications bot (May 08 2024 at 18:58):

afonso360 edited PR review comment.


Last updated: Nov 22 2024 at 16:03 UTC