Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

[interpreter] Implement SIMD extended multiply instructions #438

Merged
merged 2 commits into from
Feb 3, 2021

Conversation

ngzhian
Copy link
Member

@ngzhian ngzhian commented Feb 2, 2021

These were accepted into the proposal in #376.

There are 12 instructions in total:

  • i16x8.extmul_{low,high}i8x16{s,u}
  • i32x4.extmul_{low,high}i16x8{s,u}
  • i64x2.extmul_{low,high}i32x4{s,u}

The implementation is straightforward, widen (using existing
operations), then a multiply with the wider shape.

The binary opcodes are not decided yet, they currently follow the ones
used in V8, when those are finalized, we can change it to match.

Added a test generation script that reuses some logic in the generator
for arithmetic instructions. Since these instructions have different
src and dst shapes, I tweaked the base class to allow for having
different shapes.

interpreter/text/lexer.mll Outdated Show resolved Hide resolved
These were accepted into the proposal in WebAssembly#376.

There are 12 instructions in total:

- i16x8.extmul_{low,high}_i8x16_{s,u}
- i32x4.extmul_{low,high}_i16x8_{s,u}
- i64x2.extmul_{low,high}_i32x4_{s,u}

The implementation is straightforward, widen (using existing
operations), then a multiply with the wider shape.

The binary opcodes are not decided yet, they currently follow the ones
used in V8, when those are finalized, we can change it to match.

Added a test generation script that reuses some logic in the generator
for arithmetic instructions. Since these instructions have different
src and dst shapes, I tweaked the base class to allow for having
different shapes.
@ngzhian ngzhian merged commit 7c37165 into WebAssembly:master Feb 3, 2021
@ngzhian ngzhian deleted the ext-mul branch February 4, 2021 22:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants