v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
deoptimizer-ppc.cc
Go to the documentation of this file.
1// Copyright 2014 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
7
8namespace v8 {
9namespace internal {
10
11// The deopt exit sizes below depend on the following IsolateData layout
12// guarantees:
13#define ASSERT_OFFSET(BuiltinName) \
14 static_assert(IsolateData::builtin_tier0_entry_table_offset() + \
15 Builtins::ToInt(BuiltinName) * kSystemPointerSize <= \
16 0x1000)
17ASSERT_OFFSET(Builtin::kDeoptimizationEntry_Eager);
18ASSERT_OFFSET(Builtin::kDeoptimizationEntry_Lazy);
19#undef ASSERT_OFFSET
20
23
25
26// static
28
30 double double_val = base::ReadUnalignedValue<Float64>(
31 reinterpret_cast<Address>(simd128_registers_ + n))
32 .get_scalar();
33 float float_val = static_cast<float>(double_val);
34 return Float32::FromBits(base::bit_cast<uint32_t>(float_val));
35}
36
39 reinterpret_cast<Address>(simd128_registers_ + n));
40}
41
42void RegisterValues::SetDoubleRegister(unsigned n, Float64 value) {
44 reinterpret_cast<Address>(simd128_registers_ + n), value);
45}
46
47void FrameDescription::SetCallerPc(unsigned offset, intptr_t value) {
48 SetFrameSlot(offset, value);
49}
50
51void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) {
52 SetFrameSlot(offset, value);
53}
54
55void FrameDescription::SetCallerConstantPool(unsigned offset, intptr_t value) {
57 SetFrameSlot(offset, value);
58}
59
60void FrameDescription::SetPc(intptr_t pc) { pc_ = pc; }
61
62} // namespace internal
63} // namespace v8
static void PatchToJump(Address pc, Address new_pc)
static V8_EXPORT_PRIVATE const int kEagerDeoptExitSize
static V8_EXPORT_PRIVATE const int kAdaptShadowStackOffsetToSubtract
static V8_EXPORT_PRIVATE const int kLazyDeoptExitSize
float get_scalar() const
Definition boxed-float.h:38
void SetCallerFp(unsigned offset, intptr_t value)
void SetCallerConstantPool(unsigned offset, intptr_t value)
void SetCallerPc(unsigned offset, intptr_t value)
void SetFrameSlot(unsigned offset, intptr_t value)
void SetDoubleRegister(unsigned n, Float64 value)
Float64 GetDoubleRegister(unsigned n) const
Float32 GetFloatRegister(unsigned n) const
Simd128 simd128_registers_[Simd128Register::kNumRegisters]
#define V8_EMBEDDED_CONSTANT_POOL_BOOL
Definition globals.h:81
#define ASSERT_OFFSET(BuiltinName)
int32_t offset
static V ReadUnalignedValue(Address p)
Definition memory.h:28
V8_INLINE Dest bit_cast(Source const &source)
Definition macros.h:95
static void WriteUnalignedValue(Address p, V value)
Definition memory.h:41
FloatWithBits< 32 > Float32
Definition index.h:233
FloatWithBits< 64 > Float64
Definition index.h:234
constexpr uint8_t kInstrSize
#define DCHECK(condition)
Definition logging.h:482