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

riscv64: Fix masking on iabs #5505

Merged
merged 2 commits into from
Jan 4, 2023
Merged

Conversation

afonso360
Copy link
Contributor

When lowering iabs, we were accidentally comparing the unextended value, this caused the instruction to misbehave with certain top bits.

This commit also adds a zbb lowering that does not use jumps.

Fixes #5501

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:meta Everything related to the meta-language. labels Jan 1, 2023
Copy link
Member

@elliottt elliottt left a comment

Choose a reason for hiding this comment

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

This looks good to me, happy to merge after addressing the comments about adding ty_int.

cranelift/codegen/src/isa/riscv64/inst.isle Outdated Show resolved Hide resolved
cranelift/codegen/src/isa/riscv64/inst.isle Outdated Show resolved Hide resolved
When lowering iabs, we were accidentally comparing the unextended value
this caused the instruction to misbehave with certain top bits.

This commit also adds a zbb lowering that does not use jumps.
@elliottt elliottt merged commit 52ba72f into bytecodealliance:main Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:meta Everything related to the meta-language. cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cranelift: Wrong result for iabs.i16 on riscv64
2 participants