Stream: git-wasmtime

Topic: wasmtime / PR #5044 cranelift: Native feature detection f...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 17:03):

afonso360 opened PR #5044 from riscv-feature-detect to main:

:wave: Hey,

This PR enables native feature detection for RISC-V. We use the same mechanisms as S390X namely libc's HW_CAP to query some extensions. This also changes the testrunner to run tests based on capabilities instead of assuming they'll be there.

Not all extensions are supported by this method, so we ignore those. Fortunately none of them seem to be used by tests in our test suite.

cc: @yuyang-ok @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 17:03):

afonso360 edited PR #5044 from riscv-feature-detect to main:

:wave: Hey,

This PR enables native feature detection for RISC-V. We use the same mechanisms as S390X namely libc's HW_CAP to query extensions. This also changes the testrunner to run tests based on capabilities instead of assuming they'll be there.

Not all extensions are supported by this method, so we ignore those. Fortunately none of them seem to be used by tests in our test suite.

cc: @yuyang-ok @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 17:06):

afonso360 edited PR #5044 from riscv-feature-detect to main:

:wave: Hey,

This PR enables native feature detection for RISC-V. We use the same mechanisms as S390X namely HW_CAP to query extensions. This also changes the testrunner to run tests based on capabilities instead of assuming they'll be there.

Not all extensions are supported by this method, so we ignore those. Fortunately none of them seem to be used by tests in our test suite.

cc: @yuyang-ok @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 17:08):

afonso360 updated PR #5044 from riscv-feature-detect to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 18:35):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 18:35):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 18:35):

cfallin created PR review comment:

Should we still be doing a "subset of features required are present" test here?

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 18:35):

cfallin created PR review comment:

s/doesen't/doesn't/

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 18:44):

afonso360 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 18:44):

afonso360 created PR review comment:

We can, but it seems somewhat redundant since we also do it down below.

And in practice we pretty much always use riscv64 which (I think) gets parsed to the most generic form of Riscv64Architecture::Riscv64 instead of the more specific Riscv64gc or Riscv64imac. Using the more generic form forces us to check features individually anyway.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 18:44):

afonso360 updated PR #5044 from riscv-feature-detect to main.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 18:49):

cfallin created PR review comment:

Ah, right, I missed the code below here that actually validates needed flags. All good then.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 18:49):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 18:49):

cfallin submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 18:49):

cfallin has enabled auto merge for PR #5044.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 11 2022 at 19:29):

cfallin merged PR #5044.


Last updated: Dec 23 2024 at 12:05 UTC