Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Commit fd34086

Browse files
committed
Merge pull request #319 from billbudge/fix
Initialize all lanes during partial SIMD loads.
2 parents 5e1de7e + e0c974c commit fd34086

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/ecmascript_simd.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ function simdLoad(type, tarray, index, count) {
306306
for (var i = 0; i < bytes; i++) {
307307
dst[i] = src[i];
308308
}
309+
var typeBytes = type.lanes * type.laneSize;
310+
for (var i = bytes; i < typeBytes; i++) {
311+
dst[i] = 0;
312+
}
309313
return newValue;
310314
}
311315

0 commit comments

Comments
 (0)