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 AOT compiler issues #2697

Merged
merged 4 commits into from
Nov 2, 2023

Conversation

wenyongh
Copy link
Contributor

@wenyongh wenyongh commented Nov 1, 2023

No description provided.

LLVM_BUILD_OP(Sub, is_i32 ? I32_32 : I64_64, right, bits_minus_shift_count,
"bits_minus_shift_count", NULL);
/* Calculate (bits - shift_count) & mask */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about that because of SHIFT_COUNT_MASK at L774.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After L774 (right = right & 31), right may be 0, and after L781, shift_count = (32 - right) = 32, shift 32 bits below will get unexpected result (should shift 0 bits instead).

@wenyongh wenyongh merged commit 68a627e into bytecodealliance:main Nov 2, 2023
374 checks passed
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
- Fix potential invalid push param phis and add incoming phis to a un-existed basic block
- Fix potential invalid shift count int rotl/rotr opcodes
- Resize memory_data_size to UINT32_MAX if it is 4G when hw bound check is enabled
- Fix negative linear memory offset is used for 64-bit target it is const and larger than INT32_MAX
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.

None yet

2 participants