Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: src/arm64/eh-frame-arm64.cc

Issue 2143033002: Revert of Implement .eh_frame writer and disassembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@eh-frame-base
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/arm/eh-frame-arm.cc ('k') | src/codegen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
5 #include "src/eh-frame.h"
6
7 namespace v8 {
8 namespace internal {
9
10 static const int kX0DwarfCode = 0;
11 static const int kJsSpDwarfCode = 28;
12 static const int kFpDwarfCode = 29;
13 static const int kLrDwarfCode = 30;
14 static const int kCSpDwarfCode = 31;
15
16 STATIC_CONST_MEMBER_DEFINITION const int
17 EhFrameConstants::kCodeAlignmentFactor = 4;
18
19 STATIC_CONST_MEMBER_DEFINITION const int
20 EhFrameConstants::kDataAlignmentFactor = -8;
21
22 void EhFrameWriter::WriteReturnAddressRegisterCode() {
23 WriteULeb128(kLrDwarfCode);
24 }
25
26 void EhFrameWriter::WriteInitialStateInCie() {
27 SetBaseAddressRegisterAndOffset(x29, 0);
28 RecordRegisterNotModified(x30);
29 }
30
31 // static
32 int EhFrameWriter::RegisterToDwarfCode(Register name) {
33 switch (name.code()) {
34 case Register::kCode_x28:
35 return kJsSpDwarfCode;
36 case Register::kCode_x29:
37 return kFpDwarfCode;
38 case Register::kCode_x30:
39 return kLrDwarfCode;
40 case Register::kCode_x31:
41 return kCSpDwarfCode;
42 case Register::kCode_x0:
43 return kX0DwarfCode;
44 default:
45 UNIMPLEMENTED();
46 return -1;
47 }
48 }
49
50 #ifdef ENABLE_DISASSEMBLER
51
52 // static
53 const char* EhFrameDisassembler::DwarfRegisterCodeToString(int code) {
54 switch (code) {
55 case kFpDwarfCode:
56 return "fp";
57 case kLrDwarfCode:
58 return "lr";
59 case kJsSpDwarfCode:
60 return "jssp";
61 case kCSpDwarfCode:
62 return "csp"; // This could be zr as well
63 default:
64 UNIMPLEMENTED();
65 return nullptr;
66 }
67 }
68
69 #endif
70
71 } // namespace internal
72 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/eh-frame-arm.cc ('k') | src/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698