alexcrichton opened PR #8842 from alexcrichton:better-simm32-matching
to bytecodealliance:main
:
This commit removes the
simm32
extractor from lowerings as it's not as useful as it was when it was first introduced. Nowadays anImm64
needs to be interpreted with the type known as well to understand whether bits being masked off is significant or not. The oldsimm32
extractor only tookImm64
meaning that it was unable to do this and wouldn't match negative numbers. This is because the high 32 bits ofImm64
were always zero andsimm64
would take thei64
value fromImm64
and try to convert it to ani32
.This commit replaces
simm32
, and uses of it, with a new extractori32_from_iconst
. This matches the preexistingi64_from_iconst
and is able to take the type of the value into account and produce a correctly sign-extended value.cc #8706
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested pchickey for a review on PR #8842.
alexcrichton requested abrown for a review on PR #8842.
alexcrichton requested wasmtime-core-reviewers for a review on PR #8842.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #8842.
abrown submitted PR review.
alexcrichton merged PR #8842.
Last updated: Nov 22 2024 at 17:03 UTC