diff options
author | Max Graey <maxgraey@gmail.com> | 2022-08-02 22:29:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-02 12:29:53 -0700 |
commit | deb40b7cd6d02adc14c09782b2211e2d68c612b1 (patch) | |
tree | c9b41654a100f288576c7237bfac7f058bfc09f9 /src/wasm-stack.h | |
parent | 03b85abf184210d7a2aecac3e71659d7a3ee2eff (diff) | |
download | binaryen-deb40b7cd6d02adc14c09782b2211e2d68c612b1.tar.gz binaryen-deb40b7cd6d02adc14c09782b2211e2d68c612b1.tar.bz2 binaryen-deb40b7cd6d02adc14c09782b2211e2d68c612b1.zip |
[Optimize Instructions] Refactor squared rules (#4840)
+ Move these rules to separate function;
+ Refactor them to use matches;
+ Add comments;
+ Handle rotational shifts as well;
+ Handle overflows for `<<`, `>>`, `>>>` shifts;
+ Add mixed rotate rules:
```rust
rotl(rotr(x, C1), C2) => rotr(x, C1 - C2)
rotr(rotl(x, C1), C2) => rotl(x, C1 - C2)
```
Diffstat (limited to 'src/wasm-stack.h')
0 files changed, 0 insertions, 0 deletions