summaryrefslogtreecommitdiff
path: root/src/asmjs
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-09-23 20:50:15 -0700
committerGitHub <noreply@github.com>2017-09-23 20:50:15 -0700
commit23d015b159e6805022cfac1797030fbec42aa8d1 (patch)
tree6b13676ce0c020e376eb1ca7b5654589180455a8 /src/asmjs
parentde54837f0ff631cd8f215a447b15cb3d9d99fdff (diff)
downloadbinaryen-23d015b159e6805022cfac1797030fbec42aa8d1.tar.gz
binaryen-23d015b159e6805022cfac1797030fbec42aa8d1.tar.bz2
binaryen-23d015b159e6805022cfac1797030fbec42aa8d1.zip
wasm2asm fixes for coercion on rotl/rotr/ctz/popcnt calls, and refactor the name of constants to include the WASM_ prefix so as not to collide with constants for the unprefixed values (#1199)
Diffstat (limited to 'src/asmjs')
-rw-r--r--src/asmjs/shared-constants.cpp19
-rw-r--r--src/asmjs/shared-constants.h19
2 files changed, 22 insertions, 16 deletions
diff --git a/src/asmjs/shared-constants.cpp b/src/asmjs/shared-constants.cpp
index 6e92f1b3e..43c3d1065 100644
--- a/src/asmjs/shared-constants.cpp
+++ b/src/asmjs/shared-constants.cpp
@@ -62,18 +62,21 @@ cashew::IString GLOBAL("global"),
MATH_IMUL("Math_imul"),
MATH_ABS("Math_abs"),
MATH_CEIL("Math_ceil"),
+ MATH_CLZ32("Math_clz32"),
MATH_FLOOR("Math_floor"),
MATH_TRUNC("Math_trunc"),
MATH_NEAREST("Math_NEAREST"),
MATH_SQRT("Math_sqrt"),
MATH_MIN("Math_min"),
MATH_MAX("Math_max"),
- CTZ32("__wasm_ctz_i32"),
- CTZ64("__wasm_ctz_i64"),
- POPCNT32("__wasm_popcnt_i32"),
- POPCNT64("__wasm_popcnt_i64"),
- ROTL32("__wasm_rotl_i32"),
- ROTL64("__wasm_rotl_i64"),
- ROTR32("__wasm_rotr_i32"),
- ROTR64("__wasm_rotr_i64");
+ WASM_CTZ32("__wasm_ctz_i32"),
+ WASM_CTZ64("__wasm_ctz_i64"),
+ WASM_CLZ32("__wasm_clz_i32"),
+ WASM_CLZ64("__wasm_clz_i64"),
+ WASM_POPCNT32("__wasm_popcnt_i32"),
+ WASM_POPCNT64("__wasm_popcnt_i64"),
+ WASM_ROTL32("__wasm_rotl_i32"),
+ WASM_ROTL64("__wasm_rotl_i64"),
+ WASM_ROTR32("__wasm_rotr_i32"),
+ WASM_ROTR64("__wasm_rotr_i64");
}
diff --git a/src/asmjs/shared-constants.h b/src/asmjs/shared-constants.h
index 555efce6a..ce5cd95a6 100644
--- a/src/asmjs/shared-constants.h
+++ b/src/asmjs/shared-constants.h
@@ -65,20 +65,23 @@ extern cashew::IString GLOBAL,
MATH_IMUL,
MATH_ABS,
MATH_CEIL,
+ MATH_CLZ32,
MATH_FLOOR,
MATH_TRUNC,
MATH_NEAREST,
MATH_SQRT,
MATH_MIN,
MATH_MAX,
- CTZ32,
- CTZ64,
- POPCNT32,
- POPCNT64,
- ROTL32,
- ROTL64,
- ROTR32,
- ROTR64;
+ WASM_CTZ32,
+ WASM_CTZ64,
+ WASM_CLZ32,
+ WASM_CLZ64,
+ WASM_POPCNT32,
+ WASM_POPCNT64,
+ WASM_ROTL32,
+ WASM_ROTL64,
+ WASM_ROTR32,
+ WASM_ROTR64;
}
#endif // wasm_asmjs_shared_constants_h