cranelift: Fix br_table for i64 types in x64 backend.#3282
Merged
cfallin merged 2 commits intobytecodealliance:mainfrom Sep 2, 2021
Merged
cranelift: Fix br_table for i64 types in x64 backend.#3282cfallin merged 2 commits intobytecodealliance:mainfrom
br_table for i64 types in x64 backend.#3282cfallin merged 2 commits intobytecodealliance:mainfrom
Conversation
We still only support a maximum of u32::MAX entries, however we no longer crash when compiling 64 bit indexes. Fixes bytecodealliance#3100
bjorn3
reviewed
Sep 2, 2021
da6d3df to
ca611e9
Compare
ca611e9 to
c15c626
Compare
c15c626 to
20913a7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With this PR we fix the compilation crash for
br_table.i64. We still only support 2^32 targets, but we now allow that number to come from a i64 value.I don't really know enough about x86 to improve the
Inst::JmpTableSeqand enable 2^64 targets, but I suspect its not likely to be an issue.Fixes #3100. The CLIF Fuzzer found this independently as soon as I added jump tables.