Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix impossible relocation error in emit sdiv64 for singlepass compiler #4956

Merged

Conversation

ByteNacked
Copy link
Contributor

Description

Fixes reoccurring error ImpossibleRelocation(Dynamic(DynamicLabel(0))) with singlepass compiler for aarch64 targets
when generating sdiv64 binop.

Program which reproduce the bug bug.wat.zip.

See #4519 and comment for more info.

What's done

  • Use emit_cbz_label_far when emitting sdiv64 binop
  • Fix seemingly typos in S64 emit_cbz_label_far method

@ByteNacked ByteNacked requested a review from syrusakbary as a code owner July 24, 2024 19:14
@ByteNacked
Copy link
Contributor Author

cc @syrusakbary @xdoardo

@ByteNacked
Copy link
Contributor Author

Should I add test like here : tests/compilers/issues.rs?

@syrusakbary
Copy link
Member

Yes, we need a have a regression test to make sure it doesn't happen again. You can copy the one that you pointed at @ByteNacked

@syrusakbary
Copy link
Member

As soon as we have the test we should be good to merge :)

@ByteNacked
Copy link
Contributor Author

Minimized bug as possible, added test

@ByteNacked
Copy link
Contributor Author

cc @syrusakbary

@xdoardo xdoardo merged commit 09bddb2 into wasmerio:main Jul 30, 2024
61 of 63 checks passed
@syrusakbary
Copy link
Member

It seems there's a small issue on one integration tests, but all tests are running well, so we just merged directly @ByteNacked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants