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

Unified Diff: src/gdb-jit.cc

Issue 1804193002: S390: Add S390 specific ELF features to GDB-JIT (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gdb-jit.cc
diff --git a/src/gdb-jit.cc b/src/gdb-jit.cc
index 819bd69e070027c21e02423649ac0055ded0852e..1cff2e6fef06e16ace31f94c1439dcb574998275 100644
--- a/src/gdb-jit.cc
+++ b/src/gdb-jit.cc
@@ -656,6 +656,12 @@ class ELF BASE_EMBEDDED {
#elif V8_TARGET_ARCH_PPC64 && V8_TARGET_BIG_ENDIAN && V8_OS_LINUX
const uint8_t ident[16] = {0x7f, 'E', 'L', 'F', 2, 2, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0};
+#elif V8_TARGET_ARCH_S390X
+ const uint8_t ident[16] = {0x7f, 'E', 'L', 'F', 2, 2, 1, 3,
+ 0, 0, 0, 0, 0, 0, 0, 0};
+#elif V8_TARGET_ARCH_S390
+ const uint8_t ident[16] = {0x7f, 'E', 'L', 'F', 1, 2, 1, 3,
+ 0, 0, 0, 0, 0, 0, 0, 0};
#else
#error Unsupported target architecture.
#endif
@@ -680,6 +686,11 @@ class ELF BASE_EMBEDDED {
// id=B81AEC1A37F5DAF185257C3E004E8845&linkid=1n0000&c_t=
// c9xw7v5dzsj7gt1ifgf4cjbcnskqptmr
header->machine = 21;
+#elif V8_TARGET_ARCH_S390
+ // Processor identification value is 22 (EM_S390) as defined in the ABI:
+ // http://refspecs.linuxbase.org/ELF/zSeries/lzsabi0_s390.html#AEN1691
+ // http://refspecs.linuxbase.org/ELF/zSeries/lzsabi0_zSeries.html#AEN1599
+ header->machine = 22;
#else
#error Unsupported target architecture.
#endif
@@ -772,7 +783,8 @@ class ELFSymbol BASE_EMBEDDED {
return static_cast<Binding>(info >> 4);
}
#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X87 || \
- (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT))
+ (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT) || \
+ (V8_TARGET_ARCH_S390 && V8_TARGET_ARCH_32_BIT))
struct SerializedLayout {
SerializedLayout(uint32_t name,
uintptr_t value,
@@ -796,7 +808,7 @@ class ELFSymbol BASE_EMBEDDED {
uint16_t section;
};
#elif(V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_64_BIT) || \
- (V8_TARGET_ARCH_PPC64 && V8_OS_LINUX)
+ (V8_TARGET_ARCH_PPC64 && V8_OS_LINUX) || V8_TARGET_ARCH_S390X
struct SerializedLayout {
SerializedLayout(uint32_t name,
uintptr_t value,
@@ -1145,6 +1157,8 @@ class DebugInfoSection : public DebugSection {
UNIMPLEMENTED();
#elif V8_TARGET_ARCH_PPC64 && V8_OS_LINUX
w->Write<uint8_t>(DW_OP_reg31); // The frame pointer is here on PPC64.
+#elif V8_TARGET_ARCH_S390
+ w->Write<uint8_t>(DW_OP_reg11); // The frame pointer's here on S390.
#else
#error Unsupported target architecture.
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698