Revert "[maglev] Load SFI::length as int16"

This reverts commit d236b0ebb7.

Reason for revert: Reverting the CL that introduced the bug, see crbug.com/1408957

Original change's description:
> [maglev] Load SFI::length as int16
>
> Bug: v8:7700
> Change-Id: I853ef2c81d180a98a0c97322832f4b35789baeb2
> Fixed: chromium:1408956
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4183487
> Auto-Submit: Leszek Swirski <leszeks@chromium.org>
> Reviewed-by: Victor Gomes <victorgomes@chromium.org>
> Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85418}

Bug: v8:7700
Bug: chromium:1408957
Change-Id: I2f5b163505e437232121c8a142cd03d16f228381
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4187095
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85427}
This commit is contained in:
Jakob Linke 2023-01-23 07:36:54 +00:00 committed by V8 LUCI CQ
parent d31e52879b
commit 05a3ad7c72
3 changed files with 4 additions and 7 deletions

View File

@ -2493,9 +2493,8 @@ void FunctionLength::GenerateCode(MaglevAssembler* masm,
Register shared = temps.AcquireX(); Register shared = temps.AcquireX();
__ LoadTaggedPointerField( __ LoadTaggedPointerField(
shared, FieldMemOperand(object, JSFunction::kSharedFunctionInfoOffset)); shared, FieldMemOperand(object, JSFunction::kSharedFunctionInfoOffset));
__ LoadSignedField(ToRegister(result()).W(), __ Ldr(ToRegister(result()).W(),
FieldMemOperand(shared, SharedFunctionInfo::kLengthOffset), FieldMemOperand(shared, SharedFunctionInfo::kLengthOffset));
2);
} }
void TestUndetectable::SetValueLocationConstraints() { void TestUndetectable::SetValueLocationConstraints() {

View File

@ -451,7 +451,6 @@ MaybeHandle<Code> MaglevCompiler::GenerateCode(
if (v8_flags.print_maglev_code) { if (v8_flags.print_maglev_code) {
code->Print(); code->Print();
code->instruction_stream().Print();
} }
return code; return code;

View File

@ -1342,9 +1342,8 @@ void FunctionLength::GenerateCode(MaglevAssembler* masm,
__ LoadTaggedPointerField( __ LoadTaggedPointerField(
kScratchRegister, kScratchRegister,
FieldOperand(object, JSFunction::kSharedFunctionInfoOffset)); FieldOperand(object, JSFunction::kSharedFunctionInfoOffset));
__ LoadSignedField( __ movl(ToRegister(result()),
ToRegister(result()), FieldOperand(kScratchRegister, SharedFunctionInfo::kLengthOffset));
FieldMemOperand(kScratchRegister, SharedFunctionInfo::kLengthOffset), 2);
} }
void Int32AddWithOverflow::SetValueLocationConstraints() { void Int32AddWithOverflow::SetValueLocationConstraints() {