Skip to content

x64: Remove conditional SseOpcode::uses_src1#5842

Merged
cfallin merged 1 commit intobytecodealliance:mainfrom
alexcrichton:remove-conditional-use-src1
Feb 21, 2023
Merged

x64: Remove conditional SseOpcode::uses_src1#5842
cfallin merged 1 commit intobytecodealliance:mainfrom
alexcrichton:remove-conditional-use-src1

Conversation

@alexcrichton
Copy link
Member

This is a follow-up to comments in #5795 to remove some cruft in the x64 instruction model to ensure that the shape of an Inst reflects what's going to happen in regalloc and encoding. This accessor was used to handle round*, pextr*, and pshufb instructions. The round* ones had already moved to the appropriate XmmUnary* variant and pshufb was additionally moved over to that variant as well.

The pextr* instructions got a new Inst variant and additionally had their constructors slightly modified to no longer require the type as input. The encoding for these instructions now automatically handles the various type-related operands through a new SseOpcode::Pextrq operand to represent 64-bit movements.

This is a follow-up to comments in bytecodealliance#5795 to remove some cruft in the x64
instruction model to ensure that the shape of an `Inst` reflects what's
going to happen in regalloc and encoding. This accessor was used to
handle `round*`, `pextr*`, and `pshufb` instructions. The `round*` ones
had already moved to the appropriate `XmmUnary*` variant and `pshufb`
was additionally moved over to that variant as well.

The `pextr*` instructions got a new `Inst` variant and additionally had
their constructors slightly modified to no longer require the type as
input. The encoding for these instructions now automatically handles the
various type-related operands through a new `SseOpcode::Pextrq` operand
to represent 64-bit movements.
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen labels Feb 20, 2023
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.

Much cleaner -- thanks!

@cfallin cfallin added this pull request to the merge queue Feb 21, 2023
Merged via the queue into bytecodealliance:main with commit c65de1f Feb 21, 2023
@alexcrichton alexcrichton deleted the remove-conditional-use-src1 branch February 21, 2023 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cranelift:area:x64 Issues related to x64 codegen cranelift Issues related to the Cranelift code generator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants