Commit 54d63aca authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[ptr-compr][arm64] Finish introducing bottlenecks for accessing on-heap

tagged fields.

Implemented TurboAssembler::StoreTaggedField for tagged fields's store.
Instead of pushes like x64 does, in arm64 do loads due to doing a
load-poke combination rather than just a push.

See https://chromium-review.googlesource.com/c/v8/v8/+/1382740 for the x64
version.

Bug: v8:7703
Change-Id: I79fbba4b03260c0dba5624e990c5af51290b28c6
Reviewed-on: https://chromium-review.googlesource.com/c/1462956
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59502}
parent 2ef4e3d7
......@@ -2762,6 +2762,11 @@ void TurboAssembler::LoadAnyTaggedField(const Register& destination,
#endif
}
void TurboAssembler::StoreTaggedField(const Register& value,
const MemOperand& dst_field_operand) {
Str(value, dst_field_operand);
}
void TurboAssembler::DecompressTaggedSigned(const Register& destination,
const MemOperand& field_operand) {
RecordComment("[ DecompressTaggedSigned");
......
......@@ -1187,6 +1187,10 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase {
void LoadAnyTaggedField(const Register& destination,
const MemOperand& field_operand);
// Compresses and stores tagged value to given on-heap location.
void StoreTaggedField(const Register& value,
const MemOperand& dst_field_operand);
void DecompressTaggedSigned(const Register& destination,
const MemOperand& field_operand);
void DecompressTaggedPointer(const Register& destination,
......
......@@ -461,7 +461,8 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ AssertGeneratorObject(x1);
// Store input value into generator object.
__ Str(x0, FieldMemOperand(x1, JSGeneratorObject::kInputOrDebugPosOffset));
__ StoreTaggedField(
x0, FieldMemOperand(x1, JSGeneratorObject::kInputOrDebugPosOffset));
__ RecordWriteField(x1, JSGeneratorObject::kInputOrDebugPosOffset, x0, x3,
kLRHasNotBeenSaved, kDontSaveFPRegs);
......@@ -511,7 +512,8 @@ void Builtins::Generate_ResumeGeneratorTrampoline(MacroAssembler* masm) {
__ Poke(padreg, Operand(x11, LSL, kPointerSizeLog2));
// Poke receiver into highest claimed slot.
__ Ldr(x5, FieldMemOperand(x1, JSGeneratorObject::kReceiverOffset));
__ LoadTaggedPointerField(
x5, FieldMemOperand(x1, JSGeneratorObject::kReceiverOffset));
__ Poke(x5, Operand(x10, LSL, kPointerSizeLog2));
// ----------- S t a t e -------------
......@@ -948,7 +950,8 @@ static void ReplaceClosureCodeWithOptimizedCode(
MacroAssembler* masm, Register optimized_code, Register closure,
Register scratch1, Register scratch2, Register scratch3) {
// Store code entry in the closure.
__ Str(optimized_code, FieldMemOperand(closure, JSFunction::kCodeOffset));
__ StoreTaggedField(optimized_code,
FieldMemOperand(closure, JSFunction::kCodeOffset));
__ Mov(scratch1, optimized_code); // Write barrier clobbers scratch1 below.
__ RecordWriteField(closure, JSFunction::kCodeOffset, scratch1, scratch2,
kLRHasNotBeenSaved, kDontSaveFPRegs, OMIT_REMEMBERED_SET,
......@@ -3621,10 +3624,12 @@ void Builtins::Generate_CallApiGetter(MacroAssembler* masm) {
DCHECK(!AreAliased(receiver, holder, callback, data, undef, isolate_address,
name));
__ Ldr(data, FieldMemOperand(callback, AccessorInfo::kDataOffset));
__ LoadAnyTaggedField(data,
FieldMemOperand(callback, AccessorInfo::kDataOffset));
__ LoadRoot(undef, RootIndex::kUndefinedValue);
__ Mov(isolate_address, ExternalReference::isolate_address(masm->isolate()));
__ Ldr(name, FieldMemOperand(callback, AccessorInfo::kNameOffset));
__ LoadTaggedPointerField(
name, FieldMemOperand(callback, AccessorInfo::kNameOffset));
// PropertyCallbackArguments:
// receiver, data, return value, return value default, isolate, holder,
......
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