cfallin opened PR #7180 from cfallin:pcc-add-shift-extend
to bytecodealliance:main
:
This PR adds verification of facts on values produced by adds, shifts, and extends on AArch64, handling the various combination instructions (adds with builtin extends or shifts, for example), and also adds verification of all addressing modes, including those with builtin extends and shifts.
It also splits the test suite into"succeed" and "fail" sets, and provides cases that PCC should catch.
This is stacked on top of #7165; only the last commit is new. I'll rebase once that PR merges.
cfallin requested wasmtime-compiler-reviewers for a review on PR #7180.
cfallin requested elliottt for a review on PR #7180.
cfallin requested alexcrichton for a review on PR #7180.
cfallin requested wasmtime-core-reviewers for a review on PR #7180.
cfallin requested fitzgen for a review on PR #7180.
cfallin updated PR #7180.
cfallin edited PR #7180:
This PR adds verification of facts on values produced by adds, shifts, and extends on AArch64, handling the various combination instructions (adds with builtin extends or shifts, for example), and also adds verification of all addressing modes, including those with builtin extends and shifts.
It also splits the test suite into"succeed" and "fail" sets, and provides cases that PCC should catch.
cfallin submitted PR review.
cfallin created PR review comment:
This was an imprecision in the initial impl -- we had returned the "full range" fact (correct but not useful) rather than the thing we actually computed.
fitzgen submitted PR review.
fitzgen submitted PR review.
fitzgen created PR review comment:
Let's try to avoid
as
here and elsewhere.
fitzgen created PR review comment:
And we could reuse that factored
shl
method here :)
fitzgen created PR review comment:
Can we factor this out to a
ctx.shl
method?
fitzgen created PR review comment:
Can we do
a.checked_mul(b).unwrap()
to assert that this will not overflow?
fitzgen created PR review comment:
It would be nice to (eventually) have expected error messages that we check against for each of these failures.
fitzgen created PR review comment:
Do we know we won't ever look up facts for the aliased vreg anymore? That is, is it really safe to
take
rather thanclone
?
fitzgen created PR review comment:
get_fact_or_fail
is called a whooooole lot. Maybe we can just call itget_fact
?
cfallin submitted PR review.
cfallin created PR review comment:
The lookup follows the alias, so querying the alias will get the fact as well -- we're moving it here so if the aliaser had a fact and the aliasee didn't, the fact gets preserved (that's the common case with the way ISLE lowering works -- we alias the original reg to the new temp the rule returned).
cfallin submitted PR review.
cfallin created PR review comment:
Agreed! I hope to build up a more granular testing thing in general (assert exactly which inst/fact fails, etc)
cfallin updated PR #7180.
cfallin submitted PR review.
cfallin created PR review comment:
Done!
cfallin submitted PR review.
cfallin created PR review comment:
Done!
cfallin submitted PR review.
cfallin created PR review comment:
Done!
cfallin submitted PR review.
cfallin created PR review comment:
Done!
cfallin submitted PR review.
cfallin created PR review comment:
Yep, good idea.
cfallin has enabled auto merge for PR #7180.
cfallin updated PR #7180.
cfallin merged PR #7180.
Last updated: Dec 23 2024 at 12:05 UTC