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

Unified Diff: src/x64/eh-frame-x64.h

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, 6 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 side-by-side diff with in-line comments
Download patch
« src/eh-frame.cc ('K') | « src/v8.gyp ('k') | src/x64/eh-frame-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/eh-frame-x64.h
diff --git a/src/x64/eh-frame-x64.h b/src/x64/eh-frame-x64.h
new file mode 100644
index 0000000000000000000000000000000000000000..075d9e13652d6411a9fa75f0a5a44bdcc9772e2a
--- /dev/null
+++ b/src/x64/eh-frame-x64.h
@@ -0,0 +1,39 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_X64_UNWINDING_INFO_X64_H_
+#define V8_X64_UNWINDING_INFO_X64_H_
+
+#include "src/macro-assembler.h"
+
+namespace v8 {
+namespace internal {
+
+static const Register& kInitialBaseRegister = rsp;
rmcilroy 2016/06/30 15:23:11 Don't use const references. Just use the register
Stefano Sanfilippo 2016/07/04 18:21:15 I did away completely with this bit in the refacto
+static const int kInitialBaseOffset = 8;
+static const int kDataAlignmentFactor = -8;
rmcilroy 2016/06/30 15:23:11 Curious, why is this negative, seems pretty strang
Stefano Sanfilippo 2016/07/04 18:21:15 It's negative to reflect the fact that the stack g
+#ifdef ENABLE_DISASSEMBLER
+static const int kInitialStateOffsetInCIE = 19;
rmcilroy 2016/06/30 15:23:11 This is always 19 on all platforms (the header is
Stefano Sanfilippo 2016/07/04 18:21:15 This bit became an arch-independent constant now t
+#endif
+
+static const byte kCIE[] = {
+ 0x18, 0x00, 0x00, 0x00, // Size of the CIE
+ 0x00, 0x00, 0x00, 0x00, // CIE identifier, always 0
+ 3, // CIE version 3
+ 0x7a, 0x4c, 0x52, 0x00, // Augmentation string zLR
+ 1, // Code alignment factor
+ 0x78, // Data alignment factor (-8 SLEB encoded)
+ 16, // Return address register: rip (r16)
+ 0x02, // Length of augmentation data
+ 0xff, // No LSDA
+ 0x1b, // FDE pointers encoding: kSData4 | kPcRel
rmcilroy 2016/06/30 15:23:11 The CIE is almost identical for every platform (th
Stefano Sanfilippo 2016/07/04 18:21:15 Done.
+ // Initial state
+ 0x0c, 7, kInitialBaseOffset, // base = rsp+8
+ 0x90, 1, // rip saved at (base - 8)
+};
+
+} // namespace internal
+} // namespace v8
+
+#endif
« src/eh-frame.cc ('K') | « src/v8.gyp ('k') | src/x64/eh-frame-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698