v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
eh-frame-x64.cc
Go to the documentation of this file.
1// Copyright 2016 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
11static const int kRaxDwarfCode = 0;
12static const int kRbpDwarfCode = 6;
13static const int kRspDwarfCode = 7;
14static const int kRipDwarfCode = 16;
15
18
21}
22
25 // x64 rip (r16) has no Register instance associated.
27}
28
29// static
30int EhFrameWriter::RegisterToDwarfCode(Register name) {
31 switch (name.code()) {
32 case kRegCode_rbp:
33 return kRbpDwarfCode;
34 case kRegCode_rsp:
35 return kRspDwarfCode;
36 case kRegCode_rax:
37 return kRaxDwarfCode;
38 default:
40 }
41}
42
43#ifdef ENABLE_DISASSEMBLER
44
45// static
46const char* EhFrameDisassembler::DwarfRegisterCodeToString(int code) {
47 switch (code) {
48 case kRbpDwarfCode:
49 return "rbp";
50 case kRspDwarfCode:
51 return "rsp";
52 case kRipDwarfCode:
53 return "rip";
54 default:
56 }
57}
58
59#endif
60
61} // namespace internal
62} // namespace v8
static const int kDataAlignmentFactor
Definition eh-frame.h:63
static const int kCodeAlignmentFactor
Definition eh-frame.h:62
void SetBaseAddressRegisterAndOffset(Register base_register, int base_offset)
Definition eh-frame.cc:293
static int RegisterToDwarfCode(Register name)
void RecordRegisterSavedToStack(Register name, int offset)
Definition eh-frame.h:104
void WriteULeb128(uint32_t value)
Definition eh-frame.cc:382
constexpr int kSystemPointerSize
Definition globals.h:410
static const int kRspDwarfCode
static const int kRaxDwarfCode
static const int kRbpDwarfCode
static const int kRipDwarfCode