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 |