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

Unified Diff: src/arm64/eh-frame-arm64.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
Index: src/arm64/eh-frame-arm64.h
diff --git a/src/arm64/eh-frame-arm64.h b/src/arm64/eh-frame-arm64.h
new file mode 100644
index 0000000000000000000000000000000000000000..d34ac50cc1030cd1ccc3d4cd7e25b72c5f15313e
--- /dev/null
+++ b/src/arm64/eh-frame-arm64.h
@@ -0,0 +1,40 @@
+// 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_ARM64_EH_FRAME_ARM64_H_
+#define V8_ARM64_EH_FRAME_ARM64_H_
+
+#include "src/macro-assembler.h"
+
+namespace v8 {
+namespace internal {
+
+static const Register& kInitialBaseRegister = x29;
+static const int kInitialBaseOffset = 0;
+static const int kDataAlignmentFactor = 8;
+#ifdef ENABLE_DISASSEMBLER
+static const int kInitialStateOffsetInCIE = 19;
+#endif
+
+// The code and data alignments are a bit unorthodox, but they suit our purpose.
+static const byte kCIE[] = {
+ 0x14, 0x00, 0x00, 0x00, // Size of the CIE excluding this field
+ 0x00, 0x00, 0x00, 0x00, // CIE identifier, always 0
+ 3, // CIE version 3
+ 0x7a, 0x4c, 0x52, 0x00, // Augmentation string zLR
+ 1, // Code alignment factor
+ 8, // Data alignment factor
+ 30, // Return address register: lr (r30)
+ 2, // Length of augmentation data
+ 0xff, // No LSDA
+ 0x1b, // FDE pointers encoding: kSData4 | kPcRel
+ // Initial state
+ 0x0c, 29, kInitialBaseOffset, // base = fp+0
+ 0x08, 30, // lr is valid
+};
+
+} // namespace internal
+} // namespace v8
+
+#endif
« no previous file with comments | « src/arm/eh-frame-arm.cc ('k') | src/arm64/eh-frame-arm64.cc » ('j') | src/eh-frame.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698