summaryrefslogtreecommitdiff
path: root/src/s2wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-03-28 18:10:46 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-03-28 18:10:46 -0700
commit5c1d36fb66b5aad63b02ab44433af201d22eebe0 (patch)
treede469d720c58c07ed1f83e65c3455a2964498830 /src/s2wasm.h
parent68e15c423d92dd69138702cc572e503a33b31782 (diff)
parentcefb6b6e05c985524e885af17160b9e146f9b088 (diff)
downloadbinaryen-5c1d36fb66b5aad63b02ab44433af201d22eebe0.tar.gz
binaryen-5c1d36fb66b5aad63b02ab44433af201d22eebe0.tar.bz2
binaryen-5c1d36fb66b5aad63b02ab44433af201d22eebe0.zip
Merge branch 'vs2015_fixes' of https://github.com/juj/binaryen into vs2015_fixes
Conflicts: src/support/safe_integer.cpp
Diffstat (limited to 'src/s2wasm.h')
-rw-r--r--src/s2wasm.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index e10d365a0..f4c83fe65 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -703,7 +703,7 @@ class S2WasmBuilder {
curr->align = curr->bytes;
if (attributes[0]) {
assert(strncmp(attributes[0], "p2align=", 8) == 0);
- curr->align = pow(2, getInt(attributes[0] + 8));
+ curr->align = 1U << getInt(attributes[0] + 8);
}
setOutput(curr, assign);
};
@@ -722,7 +722,7 @@ class S2WasmBuilder {
curr->align = curr->bytes;
if (attributes[0]) {
assert(strncmp(attributes[0], "p2align=", 8) == 0);
- curr->align = pow(2, getInt(attributes[0] + 8));
+ curr->align = 1U << getInt(attributes[0] + 8);
}
curr->value = inputs[1];
setOutput(curr, assign);
@@ -1101,7 +1101,7 @@ class S2WasmBuilder {
align = getInt();
skipWhitespace();
}
- align = pow(2, align); // convert from power to actual bytes
+ align = (size_t)1 << align; // convert from power to actual bytes
if (match(".lcomm")) {
parseLcomm(name, align);
return;