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

s390x: Codegen fixes and preparation for ISLE migration #3702

Merged
merged 1 commit into from
Jan 20, 2022

Conversation

uweigand
Copy link
Member

In preparing the back-end to move to ISLE, I detected a
number of codegen bugs in the existing code, which are
fixed here:

  • Fix internal compiler error with uload16/icmp corner case.
  • Fix broken Cls lowering.
  • Correctly mask shift count for i8/i16 shifts.

In addition, I made several changes to operand encodings
in various MInst patterns. These should not have any
functional effect, but will make the ISLE migration easier:

  • Encode floating-point constants as u32/u64 in MInst patterns.
  • Encode shift amounts as u8 and Reg in ShiftOp pattern.
  • Use MemArg in LoadMultiple64 and StoreMultiple64 patterns.

CC @cfallin

In preparing the back-end to move to ISLE, I detected a
number of codegen bugs in the existing code, which are
fixed here:

- Fix internal compiler error with uload16/icmp corner case.
- Fix broken Cls lowering.
- Correctly mask shift count for i8/i16 shifts.

In addition, I made several changes to operand encodings
in various MInst patterns.  These should not have any
functional effect, but will make the ISLE migration easier:

- Encode floating-point constants as u32/u64 in MInst patterns.
- Encode shift amounts as u8 and Reg in ShiftOp pattern.
- Use MemArg in LoadMultiple64 and StoreMultiple64 patterns.
@github-actions github-actions bot added the cranelift Issues related to the Cranelift code generator label Jan 20, 2022
Copy link
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

Thanks!

The changes to the encoding tests look plausible to me but I didn't go as far as double-checking against the s390x assembler or anything like that, so I'll trust you checked those. Otherwise, good refactoring 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift Issues related to the Cranelift code generator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants