diff options
author | Alon Zakai <azakai@google.com> | 2023-11-01 15:10:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-01 15:10:11 -0700 |
commit | b14bf894b2888807f39f48b4c75a2bc68944efc8 (patch) | |
tree | 9ecd1db462bfc3698f2e9a46c853754369c046cb /src | |
parent | 1890834c69974bc956c26927b1953112e6a81bec (diff) | |
download | binaryen-b14bf894b2888807f39f48b4c75a2bc68944efc8.tar.gz binaryen-b14bf894b2888807f39f48b4c75a2bc68944efc8.tar.bz2 binaryen-b14bf894b2888807f39f48b4c75a2bc68944efc8.zip |
[Wasm64] Fix PostEmscripten::optimizeExceptions on invokes with an i64 argument (#6074)
In wasm64, function pointers are 64-bit like all pointers.
fixes #6073
Diffstat (limited to 'src')
-rw-r--r-- | src/passes/PostEmscripten.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/passes/PostEmscripten.cpp b/src/passes/PostEmscripten.cpp index 39bc3e889..6dc32eaa8 100644 --- a/src/passes/PostEmscripten.cpp +++ b/src/passes/PostEmscripten.cpp @@ -317,7 +317,7 @@ struct PostEmscripten : public Pass { // The first operand is the function pointer index, which must be // constant if we are to optimize it statically. if (auto* index = curr->operands[0]->dynCast<Const>()) { - size_t indexValue = index->value.geti32(); + size_t indexValue = index->value.getInteger(); if (indexValue >= flatTable.names.size()) { // UB can lead to indirect calls to invalid pointers. return; |