diff options
Diffstat (limited to 'src/wasm-stack.h')
-rw-r--r-- | src/wasm-stack.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/wasm-stack.h b/src/wasm-stack.h index c013a57f1..1a937f81d 100644 --- a/src/wasm-stack.h +++ b/src/wasm-stack.h @@ -291,6 +291,11 @@ void StackWriter<Mode, Parent>::mapLocalsAndEmitHeader() { mappedLocals[i] = index + currLocalsByType[f64] - 1; continue; } + index += numLocalsByType[f64]; + if (type == v128) { + mappedLocals[i] = index + currLocalsByType[v128] - 1; + continue; + } WASM_UNREACHABLE(); } // Emit them. @@ -298,12 +303,14 @@ void StackWriter<Mode, Parent>::mapLocalsAndEmitHeader() { (numLocalsByType[i32] ? 1 : 0) + (numLocalsByType[i64] ? 1 : 0) + (numLocalsByType[f32] ? 1 : 0) + - (numLocalsByType[f64] ? 1 : 0) + (numLocalsByType[f64] ? 1 : 0) + + (numLocalsByType[v128] ? 1 : 0) ); if (numLocalsByType[i32]) o << U32LEB(numLocalsByType[i32]) << binaryType(i32); if (numLocalsByType[i64]) o << U32LEB(numLocalsByType[i64]) << binaryType(i64); if (numLocalsByType[f32]) o << U32LEB(numLocalsByType[f32]) << binaryType(f32); if (numLocalsByType[f64]) o << U32LEB(numLocalsByType[f64]) << binaryType(f64); + if (numLocalsByType[v128]) o << U32LEB(numLocalsByType[v128]) << binaryType(v128); } template<StackWriterMode Mode, typename Parent> @@ -627,6 +634,7 @@ void StackWriter<Mode, Parent>::visitLoad(Load* curr) { } case f32: o << int8_t(BinaryConsts::F32LoadMem); break; case f64: o << int8_t(BinaryConsts::F64LoadMem); break; + case v128: assert(false && "v128 not implemented yet"); case unreachable: return; // the pointer is unreachable, so we are never reached; just don't emit a load case none: WASM_UNREACHABLE(); } @@ -693,6 +701,7 @@ void StackWriter<Mode, Parent>::visitStore(Store* curr) { } case f32: o << int8_t(BinaryConsts::F32StoreMem); break; case f64: o << int8_t(BinaryConsts::F64StoreMem); break; + case v128: assert(false && "v128 not implemented yet"); case none: case unreachable: WASM_UNREACHABLE(); } @@ -883,6 +892,7 @@ void StackWriter<Mode, Parent>::visitConst(Const* curr) { o << int8_t(BinaryConsts::F64Const) << curr->value.reinterpreti64(); break; } + case v128: assert(false && "v128 not implemented yet"); case none: case unreachable: WASM_UNREACHABLE(); } |