Skip to content

s390x: Codegen fixes and preparation for ISLE migration#3702

Merged
cfallin merged 1 commit into
bytecodealliance:mainfrom
uweigand:isle-prep-s390x
Jan 20, 2022
Merged

s390x: Codegen fixes and preparation for ISLE migration#3702
cfallin merged 1 commit into
bytecodealliance:mainfrom
uweigand:isle-prep-s390x

Conversation

@uweigand
Copy link
Copy Markdown
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
Copy Markdown
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 👍

@cfallin cfallin merged commit 2615ef9 into bytecodealliance:main Jan 20, 2022
@uweigand uweigand deleted the isle-prep-s390x branch January 20, 2022 20:55
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.

2 participants