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

Patch release 0.32.1. #3620

Merged
merged 6 commits into from
Dec 17, 2021
Merged

Commits on Dec 17, 2021

  1. Fix some 16- and 8-bit behavior in x64 backend related to rotates.

    Uncovered by @bjorn3 (thanks!): 8- and 16-bit rotates were not working
    properly in recent versions of Cranelift with part of the lowering
    migrated to ISLE.
    
    This PR fixes a few issues:
    
    - 8- and 16-bit rotate-left needs to mask a constant amount, if any,
      because we use a 32-bit rotate instruction and so don't get the
      appropriate shift-amount masking for free from x86 semantics.
    
    - `operand_size_from_type` was incorrect: it only handled 32- and 64-bit
      types and silently returned `OperandSize::Size32` for everything else.
      Now uses the `OperandSize::from_ty(ty)` helper as the pre-ISLE code
      did.
    
    Our test coverage for narrow value types is not great; this PR adds some
    runtests for rotl/rotr but more would always be better!
    cfallin committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    e622d90 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e3e094 View commit details
    Browse the repository at this point in the history
  3. Fix popcnt for small integers

    bjorn3 authored and cfallin committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    b51fa12 View commit details
    Browse the repository at this point in the history
  4. Add regression runtests

    bjorn3 authored and cfallin committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    1028d73 View commit details
    Browse the repository at this point in the history
  5. Use SipHasher rather than SHA-512 for ISLE manifest.

    Fixes bytecodealliance#3609. It turns out that `sha2` is a nontrivial dependency for
    Cranelift in many contexts, partly because it pulls in a number of other
    crates as well.
    
    One option is to remove the hash check under certain circumstances, as
    implemented in bytecodealliance#3616. However, this is undesirable for other reasons:
    having different dependency options in Wasmtime in particular for
    crates.io vs. local builds is not really possible, and so either we
    still have the higher build cost in Wasmtime, or we turn off the checks
    by default, which goes against the original intent of ensuring developer
    safety (no mysterious stale-source bugs).
    
    This PR uses `SipHash` instead, which is built into the standard
    library. `SipHash` is deprecated, but it's fixed and deterministic
    (across runs and across Rust versions), which is what we need, unlike
    the suggested replacement `std::collections::hash_map::DefaultHasher`.
    The result is only 64 bits, and is not cryptographically secure, but we
    never needed that; we just need a simple check to indicate when we
    forget a `rebuild-isle`.
    cfallin committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    91084f3 View commit details
    Browse the repository at this point in the history
  6. Update RELEASES.md.

    cfallin committed Dec 17, 2021
    Configuration menu
    Copy the full SHA
    40912a1 View commit details
    Browse the repository at this point in the history