From https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md#memory-related-operators-described-here As implied by the log2(alignment) encoding, the alignment must be a power of 2. As an additional validation criteria, the alignment must be less or equal to natural alignment. The bits after the log(memory-access-size) least-significant bits must be set to 0. These bits are reserved for future 🦄 use (e.g., for shared memory ordering requirements). We currently don't check this. I'll add FIXME in the code, and comment out related spec tests with FIXME as well. We should get this information from the JSON file, and auto-generate it in generateWasmOpsHeader.py.
<rdar://problem/31965349>
Created attachment 309878 [details] patch
This patch modifies one of the wasm.json files. Please ensure that any changes in one have been mirrored to the other. You can find the wasm.json files at "Source/JavaScriptCore/wasm/wasm.json" and "JSTests/wasm/wasm.json".
Comment on attachment 309878 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=309878&action=review r=me. with nit... maybe? > Source/JavaScriptCore/wasm/generateWasm.py:105 > + return str(int(math.log(memoryBits, 2))) nit: math.log doesn't return an int? O.o
(In reply to Keith Miller from comment #4) > Comment on attachment 309878 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=309878&action=review > > r=me. with nit... maybe? > > > Source/JavaScriptCore/wasm/generateWasm.py:105 > > + return str(int(math.log(memoryBits, 2))) > > nit: math.log doesn't return an int? O.o No.
Comment on attachment 309878 [details] patch Clearing flags on attachment: 309878 Committed r216908: <http://trac.webkit.org/changeset/216908>
All reviewed patches have been landed. Closing bug.