diff options
Diffstat (limited to 'deps/v8/src/arm64/code-stubs-arm64.h')
-rw-r--r-- | deps/v8/src/arm64/code-stubs-arm64.h | 40 |
1 files changed, 3 insertions, 37 deletions
diff --git a/deps/v8/src/arm64/code-stubs-arm64.h b/deps/v8/src/arm64/code-stubs-arm64.h index 13e1b9d234..a5ae2d3dee 100644 --- a/deps/v8/src/arm64/code-stubs-arm64.h +++ b/deps/v8/src/arm64/code-stubs-arm64.h @@ -130,9 +130,7 @@ class RecordWriteStub: public PlatformCodeStub { // so effectively a nop. static void Patch(Code* stub, Mode mode) { // We are going to patch the two first instructions of the stub. - PatchingAssembler patcher( - stub->GetIsolate(), - reinterpret_cast<Instruction*>(stub->instruction_start()), 2); + PatchingAssembler patcher(stub->GetIsolate(), stub->instruction_start(), 2); Instruction* instr1 = patcher.InstructionAt(0); Instruction* instr2 = patcher.InstructionAt(kInstructionSize); // Instructions must be either 'adr' or 'b'. @@ -172,37 +170,7 @@ class RecordWriteStub: public PlatformCodeStub { // The 'object' and 'address' registers must be preserved. class RegisterAllocation { public: - RegisterAllocation(Register object, - Register address, - Register scratch) - : object_(object), - address_(address), - scratch0_(scratch), - saved_regs_(kCallerSaved), - saved_fp_regs_(kCallerSavedFP) { - DCHECK(!AreAliased(scratch, object, address)); - - // The SaveCallerSaveRegisters method needs to save caller-saved - // registers, but we don't bother saving MacroAssembler scratch registers. - saved_regs_.Remove(MacroAssembler::DefaultTmpList()); - saved_fp_regs_.Remove(MacroAssembler::DefaultFPTmpList()); - - // We would like to require more scratch registers for this stub, - // but the number of registers comes down to the ones used in - // FullCodeGen::SetVar(), which is architecture independent. - // We allocate 2 extra scratch registers that we'll save on the stack. - CPURegList pool_available = GetValidRegistersForAllocation(); - CPURegList used_regs(object, address, scratch); - pool_available.Remove(used_regs); - scratch1_ = Register(pool_available.PopLowestIndex()); - scratch2_ = Register(pool_available.PopLowestIndex()); - - // The scratch registers will be restored by other means so we don't need - // to save them with the other caller saved registers. - saved_regs_.Remove(scratch0_); - saved_regs_.Remove(scratch1_); - saved_regs_.Remove(scratch2_); - } + RegisterAllocation(Register object, Register address, Register scratch); void Save(MacroAssembler* masm) { // We don't have to save scratch0_ because it was given to us as @@ -288,9 +256,7 @@ class RecordWriteStub: public PlatformCodeStub { Mode mode); void InformIncrementalMarker(MacroAssembler* masm); - void Activate(Code* code) override { - code->GetHeap()->incremental_marking()->ActivateGeneratedStub(code); - } + void Activate(Code* code) override; Register object() const { return Register::from_code(ObjectBits::decode(minor_key_)); |