HerrCai0907 opened PR #8869 from HerrCai0907:support-fmsub
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
-->
HerrCai0907 requested elliottt for a review on PR #8869.
HerrCai0907 requested wasmtime-compiler-reviewers for a review on PR #8869.
HerrCai0907 updated PR #8869.
HerrCai0907 updated PR #8869.
HerrCai0907 edited PR #8869:
<!--
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 PR wants to add the fmsub instruction lowering supporting for aarch64.
HerrCai0907 edited PR #8869:
<!--
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 PR wants to add the fmsub instruction lowering supporting for aarch64.
Part of #8603.
elliottt submitted PR review:
This seems reasonable, but could you add a test case in
cranelift/filetests/filetests/isa/aarch64
that shows what the disassembly for some simple clif programs will look like?
elliottt submitted PR review:
This seems reasonable, but could you add a test case in
cranelift/filetests/filetests/isa/aarch64
that shows what the disassembly for some simple clif programs will look like?
elliottt created PR review comment:
I think that this can be a regular
let
, asfneg
will never fail, right?
HerrCai0907 closed without merge PR #8869.
HerrCai0907 reopened PR #8869.
HerrCai0907 created PR review comment:
I follow the riscv lower rules.
https://github.com/bytecodealliance/wasmtime/blob/f4b49b8c8942523b5bc44d09aa455fadaf848e41/cranelift/codegen/src/isa/riscv64/lower.isle#L1557-L1561
HerrCai0907 submitted PR review.
HerrCai0907 edited PR review comment.
HerrCai0907 updated PR #8869.
HerrCai0907 requested elliottt for a review on PR #8869.
HerrCai0907 submitted PR review.
HerrCai0907 created PR review comment:
I don't find a way to convert this
if-let
tolet
. Could you give me some suggestion? @elliottt
HerrCai0907 updated PR #8869.
elliottt submitted PR review.
elliottt created PR review comment:
It's a little more verbose, but:
(decl is_fneg_neg (IsFneg) u64) (rule (is_fneg_neg (IsFneg.Result n _)) n) (decl is_fneg_value (IsFneg) Value) (rule (is_fneg_value (IsFneg.Result _ v)) v) (decl pure is_fneg (Value) IsFneg) (rule 1 (is_fneg (fneg x)) (IsFneg.Result 1 x)) (rule 0 (is_fneg x) (IsFneg.Result 0 x)) (rule (lower (has_type ty (fma x_src y_src z_src))) (let ((x_res IsFneg (is_fneg x_src)) (y_res IsFneg (is_fneg y_src)) (z_res IsFneg (is_fneg z_src)) (neg_xy u64 (u64_xor (is_fneg_neg x_res) (is_fneg_neg y_res))) (x Value (is_fneg_value x_res)) (y Value (is_fneg_value y_res)) (z Value (is_fneg_value z_res))) (rv_fma ty neg_xy (is_fneg_neg z_res) x y z)))
elliottt edited PR review comment.
HerrCai0907 updated PR #8869.
elliottt submitted PR review:
Thank you!
elliottt merged PR #8869.
Last updated: Dec 23 2024 at 12:05 UTC