/
githubmirror
/
node
Обзор
Документация
Войти
/
githubmirror
/
node
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
deps/v8/src/deoptimizer/mips64/deoptimizer-mips64.cc
72 строки
2 KB
Michaël Zasso
deps: update V8 to 14.1.146.11
04 окт 2025, 19:47
Не верифицирован
04 окт 2025, 19:47
7772a2d
Код
Авторство
О чём код?
// Copyright 2011 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/codegen/flush-instruction-cache.h" #include "src/codegen/macro-assembler.h" #include "src/deoptimizer/deoptimizer.h" namespace v8 { namespace internal { const int Deoptimizer::kEagerDeoptExitSize = 3 * kInstrSize; const int Deoptimizer::kLazyDeoptExitSize = 3 * kInstrSize; const int Deoptimizer::kAdaptShadowStackOffsetToSubtract = 0; // static void Deoptimizer::ZapCode(Address start, Address end, RelocIterator& it) { // TODO(422364570): Support this platform. } // static void Deoptimizer::PatchToJump(Address pc, Address new_pc) { intptr_t offset = (new_pc - pc) / kInstrSize; // Give enough space not to try to grow the buffer. constexpr int kSize = 128; AccountingAllocator allocator; Assembler masm( &allocator, AssemblerOptions{}, ExternalAssemblerBuffer(reinterpret_cast<uint8_t*>(pc), kSize)); DCHECK(is_int16(offset)); // Branch target is computed based on delay slot address on MIPS. masm.b(static_cast<int>(offset - 1)); masm.nop(); // Delay slot FlushInstructionCache(pc, kSize); } Float32 RegisterValues::GetFloatRegister(unsigned n) const { V8_ASSUME(n < arraysize(simd128_registers_)); return base::ReadUnalignedValue<Float32>( reinterpret_cast<Address>(simd128_registers_ + n)); } Float64 RegisterValues::GetDoubleRegister(unsigned n) const { V8_ASSUME(n < arraysize(simd128_registers_)); return base::ReadUnalignedValue<Float64>( reinterpret_cast<Address>(simd128_registers_ + n)); } void RegisterValues::SetDoubleRegister(unsigned n, Float64 value) { V8_ASSUME(n < arraysize(simd128_registers_)); base::WriteUnalignedValue(reinterpret_cast<Address>(simd128_registers_ + n), value); } void FrameDescription::SetCallerPc(unsigned offset, intptr_t value) { SetFrameSlot(offset, value); } void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { SetFrameSlot(offset, value); } void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { // No embedded constant pool support. UNREACHABLE(); } void FrameDescription::SetPc(intptr_t pc) { pc_ = pc; } } // namespace internal } // namespace v8