1 // Copyright 2012 the V8 project authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #if V8_TARGET_ARCH_X64 6 7 #include "src/deoptimizer/deoptimizer.h" 8 #include "src/execution/isolate-data.h" 9 10 namespace v8 { 11 namespace internal { 12 13 // The deopt exit sizes below depend on the following IsolateData layout 14 // guarantees: 15 #define ASSERT_OFFSET(BuiltinName) \ 16 STATIC_ASSERT(IsolateData::builtin_tier0_entry_table_offset() + \ 17 Builtins::ToInt(BuiltinName) * kSystemPointerSize <= \ 18 0x7F) 19 ASSERT_OFFSET(Builtin::kDeoptimizationEntry_Eager); 20 ASSERT_OFFSET(Builtin::kDeoptimizationEntry_Lazy); 21 #undef ASSERT_OFFSET 22 23 const int Deoptimizer::kEagerDeoptExitSize = 4; 24 const int Deoptimizer::kLazyDeoptExitSize = 4; 25 GetFloatRegister(unsigned n) const26Float32 RegisterValues::GetFloatRegister(unsigned n) const { 27 return Float32::FromBits( 28 static_cast<uint32_t>(double_registers_[n].get_bits())); 29 } 30 SetCallerPc(unsigned offset,intptr_t value)31void FrameDescription::SetCallerPc(unsigned offset, intptr_t value) { 32 SetFrameSlot(offset, value); 33 } 34 SetCallerFp(unsigned offset,intptr_t value)35void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { 36 SetFrameSlot(offset, value); 37 } 38 SetCallerConstantPool(unsigned offset,intptr_t value)39void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) { 40 // No embedded constant pool support. 41 UNREACHABLE(); 42 } 43 SetPc(intptr_t pc)44void FrameDescription::SetPc(intptr_t pc) { pc_ = pc; } 45 46 } // namespace internal 47 } // namespace v8 48 49 #endif // V8_TARGET_ARCH_X64 50