summaryrefslogtreecommitdiff
path: root/src/passes/Memory64Lowering.cpp
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2021-07-09 11:02:45 -0700
committerGitHub <noreply@github.com>2021-07-09 11:02:45 -0700
commitf77e8ddc8c0da06cc0cd2c063237660e8ec4020b (patch)
tree9a50adc8cc905a2193d9f9fd04447110870b082a /src/passes/Memory64Lowering.cpp
parenta533488572de0c8916add42b01530f0244ca4623 (diff)
downloadbinaryen-f77e8ddc8c0da06cc0cd2c063237660e8ec4020b.tar.gz
binaryen-f77e8ddc8c0da06cc0cd2c063237660e8ec4020b.tar.bz2
binaryen-f77e8ddc8c0da06cc0cd2c063237660e8ec4020b.zip
[Memory64] further memory limit fixes (#3865)
That were somehow missed.. triggered by emscripten tests
Diffstat (limited to 'src/passes/Memory64Lowering.cpp')
-rw-r--r--src/passes/Memory64Lowering.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/passes/Memory64Lowering.cpp b/src/passes/Memory64Lowering.cpp
index 5e1004797..c376ed6c6 100644
--- a/src/passes/Memory64Lowering.cpp
+++ b/src/passes/Memory64Lowering.cpp
@@ -98,6 +98,9 @@ struct Memory64Lowering : public WalkerPass<PostWalker<Memory64Lowering>> {
}
// This is visited last.
memory->indexType = Type::i32;
+ if (memory->hasMax() && memory->max > Memory::kMaxSize32) {
+ memory->max = Memory::kMaxSize32;
+ }
}
};