[lld][WebAssembly] Handle 4gb max memories
authorThomas Lively <tlively@google.com>
Fri, 3 Apr 2020 23:18:29 +0000 (16:18 -0700)
committerThomas Lively <tlively@google.com>
Thu, 9 Apr 2020 20:06:41 +0000 (13:06 -0700)
commitc496d84b4f316d8189d3fc91ac08493e5c50ee12
treec86fd77904aaf9c09814087e0d93ef56c7957a45
parent98b47f447c93e531db8cc70841bad8c867d76134
[lld][WebAssembly] Handle 4gb max memories

Summary:
A previous change (53211a) had updated the argument parsing to handle
large max memories, but 4294967296 would still wrap to zero after the
options were parsed. This change updates the configuration to use a
64-bit integer to store the max memory to avoid that overflow.

Reviewers: sbc100

Subscribers: dschuff, jgravelle-google, aheejin, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77437
lld/test/wasm/large-memory.test
lld/wasm/Config.h
lld/wasm/Writer.cpp