v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
eh-frame-s390.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 kR0DwarfCode = 0;
12static const int kFpDwarfCode = 11; // frame-pointer
13static const int kR14DwarfCode = 14; // return-address(lr)
14static const int kSpDwarfCode = 15; // stack-pointer
15
16const int EhFrameConstants::kCodeAlignmentFactor = 2; // 1 or 2 in s390
18
21}
22
26}
27
28// static
29int EhFrameWriter::RegisterToDwarfCode(Register name) {
30 switch (name.code()) {
31 case kRegCode_fp:
32 return kFpDwarfCode;
33 case kRegCode_r14:
34 return kR14DwarfCode;
35 case kRegCode_sp:
36 return kSpDwarfCode;
37 case kRegCode_r0:
38 return kR0DwarfCode;
39 default:
41 }
42}
43
44#ifdef ENABLE_DISASSEMBLER
45
46// static
47const char* EhFrameDisassembler::DwarfRegisterCodeToString(int code) {
48 switch (code) {
49 case kFpDwarfCode:
50 return "fp";
51 case kR14DwarfCode:
52 return "lr";
53 case kSpDwarfCode:
54 return "sp";
55 default:
57 }
58}
59
60#endif
61
62} // namespace internal
63} // 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 RecordRegisterNotModified(Register name)
Definition eh-frame.cc:323
void WriteULeb128(uint32_t value)
Definition eh-frame.cc:382
static const int kR0DwarfCode
static const int kFpDwarfCode
static const int kSpDwarfCode
static const int kR14DwarfCode