summaryrefslogtreecommitdiff
path: root/src/wasm-interpreter.h
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2016-03-09 17:38:56 -0800
committerDerek Schuff <dschuff@chromium.org>2016-03-09 17:38:56 -0800
commit864fa9c37ba1b33605805d89ab920e6fa4e67a38 (patch)
treec2cb837f4285b06b47bbb017a909df718673b7c1 /src/wasm-interpreter.h
parente9d98deed872a72a826f78c8525464c446c6f21b (diff)
parentac9d61d45fec988640b57dc6b9de97e7d46c41f5 (diff)
downloadbinaryen-864fa9c37ba1b33605805d89ab920e6fa4e67a38.tar.gz
binaryen-864fa9c37ba1b33605805d89ab920e6fa4e67a38.tar.bz2
binaryen-864fa9c37ba1b33605805d89ab920e6fa4e67a38.zip
Merge pull request #225 from WebAssembly/memory_pages
Make initial and max memory sizes be in pages instead of bytes
Diffstat (limited to 'src/wasm-interpreter.h')
-rw-r--r--src/wasm-interpreter.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h
index 223a9e1a5..f6a3e1027 100644
--- a/src/wasm-interpreter.h
+++ b/src/wasm-interpreter.h
@@ -102,7 +102,7 @@ public:
Module& wasm;
ModuleInstance(Module& wasm, ExternalInterface* externalInterface) : wasm(wasm), externalInterface(externalInterface) {
- memorySize = wasm.memory.initial;
+ memorySize = wasm.memory.initial * Memory::kPageSize;
externalInterface->init(wasm);
if (wasm.start.is()) {
LiteralList arguments;
@@ -464,6 +464,8 @@ private:
case Shl: return left.shl(right.and_(Literal(int32_t(31))));
case ShrU: return left.shrU(right.and_(Literal(int32_t(31))));
case ShrS: return left.shrS(right.and_(Literal(int32_t(31))));
+ case RotL: return left.rotL(right);
+ case RotR: return left.rotR(right);
case Eq: return left.eq(right);
case Ne: return left.ne(right);
case LtS: return left.ltS(right);
@@ -505,6 +507,8 @@ private:
case Shl: return left.shl(right.and_(Literal(int64_t(63))));
case ShrU: return left.shrU(right.and_(Literal(int64_t(63))));
case ShrS: return left.shrS(right.and_(Literal(int64_t(63))));
+ case RotL: return left.rotL(right);
+ case RotR: return left.rotR(right);
case Eq: return left.eq(right);
case Ne: return left.ne(right);
case LtS: return left.ltS(right);