jeffcharles opened PR #6487 from jeffcharles:winch-add-int-cmps
to bytecodealliance:main
:
<!--
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
-->
This change introduces support for binary comparison instructions fori32
s andi64
s to Winch.To accomplish this, I introduce a
cmp_with_set
method on the macro assembler that emits acmp
instruction or equivalent, emits an instruction to clear the destination register, and emits an instruction to set the destination register to0
or1
depending on the kind of comparison.
jeffcharles requested elliottt for a review on PR #6487.
jeffcharles requested wasmtime-fuzz-reviewers for a review on PR #6487.
jeffcharles requested wasmtime-compiler-reviewers for a review on PR #6487.
saulecabrera submitted PR review:
Left a small suggestion regarding documentation. Otherwise this looks reasonable to me.
saulecabrera submitted PR review:
Left a small suggestion regarding documentation. Otherwise this looks reasonable to me.
saulecabrera created PR review comment:
/// Compare two operands and put the result in dst.
saulecabrera created PR review comment:
Perhaps could we also add a comment stating that in some architectures(x64), this function will emit a series of instructions and update the destination with the result of the comparison?
jeffcharles updated PR #6487.
jeffcharles updated PR #6487.
saulecabrera has enabled auto merge for PR #6487.
saulecabrera merged PR #6487.
Last updated: Nov 22 2024 at 16:03 UTC