Commit fc0d538
authored
* add simd crate feature to wasmi_core crate
* implement V128 skeleton
This is the skeleton with which is it going to be possible to implement most of the V128 API in an efficient way.
* rename IntoLane and Lane (appending 's')
* add docs to most (or all) simd.rs definitions
* add note comments to unsafe transmutes
* implement SIMD splat instructions
* add extract_lane SIMD APIs
* expect dead_code warnings
This will help later to remove the lint again.
* remove empty line
* remove non-existing extract_lane APIs
* add replace_lane SIMD APIs
* add V128 From impls for bytes and i128
* add SIMD binary integer math ops
* add unary integer math SIMD ops
* add SIMD integer abs ops
* add unsigned SIMD lanes types
* use unsigned SIMD types where applicable for now
* improve docs for IntoLanes and IntoLaneIdx
* add helper IntoLanewiseWidening trait
* clean-up API design
* add SIMD ext_mul_{low,high} ops
* generate docs for new SIMD extmul ops
* add extadd_pairwise SIMD ops
* implement add_sat and sub_sat SIMD ops
* add i16x8_q15mulr_sat_s SIMD operation
* add SIMD integer min and max operations
* add SIMD avgr_u ops
* implement Wasm shift SIMD ops
* add bitwise SIMD ops
* add v128.bitselect SIMD operation
* add SIMD i8x16.popcnt instruction
* add i32x4.dot_i16x8_s SIMD operation
* implement SIMD reduce ops
* add SIMD comparison instructions
* add unary float SIMD instructions
* move op! macro to top of file
* add float binary SIMD instructions
* add lanewise unary cast SIMD ops
* rewrite i32x4.dot_i16x8_s in terms of other fns
* add FromNarrow trait and impls
* add V128 convenience methods for FromNarrow
* rewrite extmul ops in terms of FromNarrow APIs
* rewrite extadd ops in terms of FromNarrow APIs
* add new extend SIMD ops
* remove old widening and narrowing APIs
* no longer silence dead_code warnings
* add missing docs for convenience method
* refactor unary widen SIMD ops generation
* add more widen-low SIMD ops
* fix signedness of some SIMD extend-{low,high} ops
* rename macro
* add narrowing-low-high SIMD ops
* rename FromNarrow method
* fix i32x4_dot_i16x8_s SIMD impl
* re-format code
* re-write from_low_high impl
* add narrowing low-or SIMD ops
* convert all V128 methods to functions in the simd module
This better aligns the V128 API with the wasmi_core::wasm API. Furthermore it makes more sense to have those methods as functions for the load and store APIs that still have to be implemented.
* align docs with others
* align more docs
* replace register128 feature with simd feature
* move load/store stuff into memory.rs module
* redesign WrapInto and ExtendInto macros
* remove ImmByte since it is unused
* rename OutOfBoundsLaneId
* merge macro invocations
* re-design extmul macros
* refactor macros
* refactor memory submodule
This now exposes `load`, `load_at`, `store` and `store_at` functions additionally to the load_extend and store_wrap ones. This way we no longer require the weird `WrapInto` and `ExtendInto` impls for `T -> T`.
* add v128 store instructions
* add v128.load evaluators
* add LaneIndex trait
* add more IntoLaneIdx trait impls
This allows to infer the LaneIdx type from more types such as i8, u32, f64, etc..
* add impls for v128.load{32,64}_zero
* update docs
* add v128.loadN_splat instruction impls
* add v128.loadN_lane SIMD instruction impls
* update docs error sections
* implement V128 load_mxn_{s,u} ops
* configure Cargo to generate simd docs
* remove value128 crate feature
The new `simd` crate feature is a full replacement for it.
* fix avgr SIMD instructions and clippy warnings
- Fixes an overflow issue in the avgr_u SIMD instructions.
- Now uses div_ceil as suggested by clippy.
- Deduplicated logic via macro.
* rename some FromNarrow methods to please clippy
* add SIMD shuffle and swizzle ops
1 parent cedb0f8 commit fc0d538
File tree
6 files changed
+1741
-18
lines changed- crates
- core
- src
- wasmi
6 files changed
+1741
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
| 24 | + | |
26 | 25 | | |
27 | | - | |
28 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | 61 | | |
58 | | - | |
| 62 | + | |
59 | 63 | | |
60 | | - | |
61 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
62 | 71 | | |
63 | | - | |
64 | 72 | | |
65 | 73 | | |
66 | 74 | | |
| |||
140 | 148 | | |
141 | 149 | | |
142 | 150 | | |
143 | | - | |
| 151 | + | |
144 | 152 | | |
145 | 153 | | |
146 | 154 | | |
| |||
0 commit comments