From c31c77a3c7c49e9bb53743572f6aa5d36240de8b Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Thu, 9 Jan 2020 14:31:51 +0000 Subject: [PATCH] [CSA] Load requires IntPtrAdd for offset Fix for a bug introduced in https://chromium-review.googlesource.com/c/v8/v8/+/1977863 Change-Id: I4dbf259899005bb3b317bc5e8222d19c16abede4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1993284 Reviewed-by: Ross McIlroy Commit-Queue: Santiago Aboy Solanes Cr-Commit-Position: refs/heads/master@{#65665} --- src/codegen/code-stub-assembler.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/codegen/code-stub-assembler.cc b/src/codegen/code-stub-assembler.cc index cb2cd06c55..7093658769 100644 --- a/src/codegen/code-stub-assembler.cc +++ b/src/codegen/code-stub-assembler.cc @@ -2303,14 +2303,11 @@ TNode CodeStubAssembler::LoadFixedBigUint64ArrayElementAsTagged( #if defined(V8_TARGET_BIG_ENDIAN) TNode high = Load(data_pointer, offset); TNode low = Load( - data_pointer, Int32Add(TruncateIntPtrToInt32(offset), - Int32Constant(kSystemPointerSize))); + data_pointer, IntPtrAdd(offset, IntPtrConstant(kSystemPointerSize))); #else TNode low = Load(data_pointer, offset); - TNode high = UncheckedCast( - Load(MachineType::UintPtr(), data_pointer, - Int32Add(TruncateIntPtrToInt32(offset), - Int32Constant(kSystemPointerSize)))); + TNode high = Load( + data_pointer, IntPtrAdd(offset, IntPtrConstant(kSystemPointerSize))); #endif return BigIntFromUint32Pair(low, high); }