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

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

Issue 2023503002: Reland Implement .eh_frame writer and disassembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@eh-frame-base
Patch Set: if => ifdef 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
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/x64/eh-frame-x64.h"
6
7 namespace v8 {
8 namespace internal {
9
10 static const int kRbpDwarfCode = 6;
11 static const int kRspDwarfCode = 7;
12 static const int kRipDwarfCode = 16;
13
14 const char* DwarfRegisterCodeToString(int code) {
15 switch (code) {
16 case kRbpDwarfCode:
17 return "rbp";
18 case kRspDwarfCode:
19 return "rsp";
20 case kRipDwarfCode:
21 return "rip";
22 default:
23 UNIMPLEMENTED();
24 return nullptr;
25 }
26 }
27
28 int RegisterToDwarfCode(Register name) {
29 switch (name.reg_code) {
30 case Register::kCode_rbp:
31 return kRbpDwarfCode;
32 case Register::kCode_rsp:
33 return kRspDwarfCode;
34 default:
35 UNIMPLEMENTED();
36 return -1;
37 }
38 }
39
40 } // namespace internal
41 } // namespace v8
OLDNEW
« src/x64/eh-frame-x64.h ('K') | « src/x64/eh-frame-x64.h ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698