[bigint,compiler] Fix endianness issue in bitfield access.
See https://chromium-review.googlesource.com/c/v8/v8/+/904725. Change-Id: I6b017c0a8d1c521a83e0c6b5315e1c9689bb4f19 Bug: v8:6791 Reviewed-on: https://chromium-review.googlesource.com/906422 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#51140}
This commit is contained in:
parent
a2aac98ddf
commit
f4e42f9d31
@ -56,7 +56,7 @@ FieldAccess AccessBuilder::ForHeapNumberValue() {
|
||||
FieldAccess AccessBuilder::ForBigIntBitfield() {
|
||||
FieldAccess access = {
|
||||
kTaggedBase, BigInt::kBitfieldOffset, MaybeHandle<Name>(),
|
||||
MaybeHandle<Map>(), TypeCache::Get().kInt32, MachineType::Int32(),
|
||||
MaybeHandle<Map>(), TypeCache::Get().kInt32, MachineType::IntPtr(),
|
||||
kNoWriteBarrier};
|
||||
return access;
|
||||
}
|
||||
|
@ -1175,9 +1175,9 @@ void EffectControlLinearizer::TruncateTaggedPointerToBit(
|
||||
__ Bind(&if_bigint);
|
||||
{
|
||||
Node* bitfield = __ LoadField(AccessBuilder::ForBigIntBitfield(), value);
|
||||
Node* length_is_zero = __ Word32Equal(
|
||||
__ Word32And(bitfield, __ Int32Constant(BigInt::LengthBits::kMask)),
|
||||
zero);
|
||||
Node* length_is_zero = __ WordEqual(
|
||||
__ WordAnd(bitfield, __ IntPtrConstant(BigInt::LengthBits::kMask)),
|
||||
__ IntPtrConstant(0));
|
||||
__ Goto(done, __ Word32Equal(length_is_zero, zero));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user