Skip to content

x64: Fix codegen for the i8x16.swizzle instruction#4318

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-swizzle
Jun 27, 2022
Merged

x64: Fix codegen for the i8x16.swizzle instruction#4318
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-swizzle

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This commit fixes a mistake in the Swizzle opcode implementation in
the x64 backend of Cranelift. Previously an input register was casted to
a writable register and then modified, which I believe instructions are
not supposed to do. This was discovered as part of my investigation
into #4315.

This commit fixes a mistake in the `Swizzle` opcode implementation in
the x64 backend of Cranelift. Previously an input register was casted to
a writable register and then modified, which I believe instructions are
not supposed to do. This was discovered as part of my investigation
into bytecodealliance#4315.
@github-actions github-actions Bot added cranelift Issues related to the Cranelift code generator cranelift:area:x64 Issues related to x64 codegen labels Jun 25, 2022
@alexcrichton alexcrichton merged commit dc2fe0a into bytecodealliance:main Jun 27, 2022
@alexcrichton alexcrichton deleted the fix-swizzle branch June 27, 2022 18:20
alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request Jun 27, 2022
…e#4318)

This commit fixes a mistake in the `Swizzle` opcode implementation in
the x64 backend of Cranelift. Previously an input register was casted to
a writable register and then modified, which I believe instructions are
not supposed to do. This was discovered as part of my investigation
into bytecodealliance#4315.
alexcrichton added a commit that referenced this pull request Jun 27, 2022
* x64: Fix codegen for the `i8x16.swizzle` instruction (#4318)

This commit fixes a mistake in the `Swizzle` opcode implementation in
the x64 backend of Cranelift. Previously an input register was casted to
a writable register and then modified, which I believe instructions are
not supposed to do. This was discovered as part of my investigation
into #4315.

* x64: Fix codegen for the `select` instruction with v128 (#4317)

This commit fixes a bug in the previous codegen for the `select`
instruction when the operations of the `select` were of the `v128` type.
Previously teh `XmmCmove` instruction only stored an `OperandSize` of 32
or 64 for a 64 or 32-bit move, but this was also used for these 128-bit
types which meant that when used the wrong move instruction was
generated. The fix applied here is to store the whole `Type` being moved
so the 128-bit variant can be selected as well.
afonso360 pushed a commit to afonso360/wasmtime that referenced this pull request Jun 30, 2022
…e#4318)

This commit fixes a mistake in the `Swizzle` opcode implementation in
the x64 backend of Cranelift. Previously an input register was casted to
a writable register and then modified, which I believe instructions are
not supposed to do. This was discovered as part of my investigation
into bytecodealliance#4315.
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