diff options
author | juj <jujjyl@gmail.com> | 2020-02-25 09:59:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-25 09:59:45 +0200 |
commit | b17e84b491a309c9f15e7a502f115ece19404b11 (patch) | |
tree | c5db445783e28e5e24983ff62a6c7197c30b8ec7 /src/asm2wasm.h | |
parent | dfb2f27d0123ad62b44914fd0210db1d21cfc91e (diff) | |
download | binaryen-b17e84b491a309c9f15e7a502f115ece19404b11.tar.gz binaryen-b17e84b491a309c9f15e7a502f115ece19404b11.tar.bz2 binaryen-b17e84b491a309c9f15e7a502f115ece19404b11.zip |
Fix to https://github.com/WebAssembly/binaryen/issues/2170 (#2654)
* Fix to https://github.com/WebAssembly/binaryen/issues/2170
* Adjust fix
* clang-format
Diffstat (limited to 'src/asm2wasm.h')
-rw-r--r-- | src/asm2wasm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/asm2wasm.h b/src/asm2wasm.h index 33e84bc33..95a5ba481 100644 --- a/src/asm2wasm.h +++ b/src/asm2wasm.h @@ -3252,6 +3252,12 @@ Function* Asm2WasmBuilder::processFunction(Ref ast) { ptr[3]->isNumber() && ptr[3]->getInteger() == 0)) { return process(ptr[2]); } + // If there is no shift at all, process the variable directly + // E.g. the address variable "$4" in Atomics_compareExchange(HEAP8, $4, $7, + // $8); + if (ptr->isString()) { + return process(ptr); + } // Otherwise do the same as processUnshifted. return processUnshifted(ptr, bytes); }; |