Commit 7a491d03 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

Fix arm64 bug in 31bit Smis

Change-Id: Id73e9e4862d3b7751b6867183a43cfa7a0cdef52
Bug: v8:8344
Reviewed-on: https://chromium-review.googlesource.com/c/1355145
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57966}
parent 8e458891
......@@ -86,11 +86,14 @@ struct SmiTagging<8> {
}
};
#if defined(V8_COMPRESS_POINTERS) || defined(V8_31BIT_SMIS_ON_64BIT_ARCH)
#if defined(V8_COMPRESS_POINTERS)
static_assert(
kApiSystemPointerSize == kApiInt64Size,
"Pointer compression can be enabled only for 64-bit architectures");
typedef SmiTagging<4> PlatformSmiTagging;
#endif
#if defined(V8_COMPRESS_POINTERS) || defined(V8_31BIT_SMIS_ON_64BIT_ARCH)
typedef SmiTagging<kApiIntSize> PlatformSmiTagging;
#else
typedef SmiTagging<kApiSystemPointerSize> PlatformSmiTagging;
#endif
......
......@@ -3926,6 +3926,9 @@ Node* EffectControlLinearizer::SmiMaxValueConstant() {
}
Node* EffectControlLinearizer::SmiShiftBitsConstant() {
if (machine()->Is64() && SmiValuesAre31Bits()) {
return __ Int32Constant(kSmiShiftSize + kSmiTagSize);
}
return __ IntPtrConstant(kSmiShiftSize + kSmiTagSize);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment