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

Side by Side Diff: src/arm/eh-frame-arm.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/arm/eh-frame-arm.h"
6
7 namespace v8 {
8 namespace internal {
9
10 static const int kFpDwarfCode = 11;
11 static const int kSpDwarfCode = 13;
12 static const int kLrDwarfCode = 14;
13
14 const char* DwarfRegisterCodeToString(int code) {
15 switch (code) {
16 case kFpDwarfCode:
17 return "fp";
18 case kSpDwarfCode:
19 return "sp";
20 case kLrDwarfCode:
21 return "lr";
22 default:
23 UNIMPLEMENTED();
24 return nullptr;
25 }
26 }
27
28 int RegisterToDwarfCode(Register name) {
29 switch (name.reg_code) {
30 case Register::kCode_fp:
31 return kFpDwarfCode;
32 case Register::kCode_sp:
33 return kSpDwarfCode;
34 case Register::kCode_lr:
35 return kLrDwarfCode;
36 default:
37 UNIMPLEMENTED();
38 return -1;
39 }
40 }
41
42 } // namespace internal
43 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/eh-frame-arm.h ('k') | src/arm64/eh-frame-arm64.h » ('j') | src/eh-frame.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698