[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 AccessBuilder::ForBigIntBitfield() {
|
||||||
FieldAccess access = {
|
FieldAccess access = {
|
||||||
kTaggedBase, BigInt::kBitfieldOffset, MaybeHandle<Name>(),
|
kTaggedBase, BigInt::kBitfieldOffset, MaybeHandle<Name>(),
|
||||||
MaybeHandle<Map>(), TypeCache::Get().kInt32, MachineType::Int32(),
|
MaybeHandle<Map>(), TypeCache::Get().kInt32, MachineType::IntPtr(),
|
||||||
kNoWriteBarrier};
|
kNoWriteBarrier};
|
||||||
return access;
|
return access;
|
||||||
}
|
}
|
||||||
|
@ -1175,9 +1175,9 @@ void EffectControlLinearizer::TruncateTaggedPointerToBit(
|
|||||||
__ Bind(&if_bigint);
|
__ Bind(&if_bigint);
|
||||||
{
|
{
|
||||||
Node* bitfield = __ LoadField(AccessBuilder::ForBigIntBitfield(), value);
|
Node* bitfield = __ LoadField(AccessBuilder::ForBigIntBitfield(), value);
|
||||||
Node* length_is_zero = __ Word32Equal(
|
Node* length_is_zero = __ WordEqual(
|
||||||
__ Word32And(bitfield, __ Int32Constant(BigInt::LengthBits::kMask)),
|
__ WordAnd(bitfield, __ IntPtrConstant(BigInt::LengthBits::kMask)),
|
||||||
zero);
|
__ IntPtrConstant(0));
|
||||||
__ Goto(done, __ Word32Equal(length_is_zero, zero));
|
__ Goto(done, __ Word32Equal(length_is_zero, zero));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user