Commit 4348c3a3 authored by joransiu's avatar joransiu Committed by Commit bot

S390: Add S390 specific ELF features to GDB-JIT

Add support for S390 to GDB-JIT.

R=danno@chromium.org,jkummerow@chromium.org,jochen@chromium.org,jyan@ca.ibm.com,michael_dawson@ca.ibm.com,mbrandy@us.ibm.com

BUG=

Review URL: https://codereview.chromium.org/1804193002

Cr-Commit-Position: refs/heads/master@{#34800}
parent 7a7d5815
...@@ -656,6 +656,12 @@ class ELF BASE_EMBEDDED { ...@@ -656,6 +656,12 @@ class ELF BASE_EMBEDDED {
#elif V8_TARGET_ARCH_PPC64 && V8_TARGET_BIG_ENDIAN && V8_OS_LINUX #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, const uint8_t ident[16] = {0x7f, 'E', 'L', 'F', 2, 2, 1, 0,
0, 0, 0, 0, 0, 0, 0, 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 #else
#error Unsupported target architecture. #error Unsupported target architecture.
#endif #endif
...@@ -680,6 +686,11 @@ class ELF BASE_EMBEDDED { ...@@ -680,6 +686,11 @@ class ELF BASE_EMBEDDED {
// id=B81AEC1A37F5DAF185257C3E004E8845&linkid=1n0000&c_t= // id=B81AEC1A37F5DAF185257C3E004E8845&linkid=1n0000&c_t=
// c9xw7v5dzsj7gt1ifgf4cjbcnskqptmr // c9xw7v5dzsj7gt1ifgf4cjbcnskqptmr
header->machine = 21; 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 #else
#error Unsupported target architecture. #error Unsupported target architecture.
#endif #endif
...@@ -772,7 +783,8 @@ class ELFSymbol BASE_EMBEDDED { ...@@ -772,7 +783,8 @@ class ELFSymbol BASE_EMBEDDED {
return static_cast<Binding>(info >> 4); return static_cast<Binding>(info >> 4);
} }
#if (V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_X87 || \ #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 { struct SerializedLayout {
SerializedLayout(uint32_t name, SerializedLayout(uint32_t name,
uintptr_t value, uintptr_t value,
...@@ -796,7 +808,7 @@ class ELFSymbol BASE_EMBEDDED { ...@@ -796,7 +808,7 @@ class ELFSymbol BASE_EMBEDDED {
uint16_t section; uint16_t section;
}; };
#elif(V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_64_BIT) || \ #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 { struct SerializedLayout {
SerializedLayout(uint32_t name, SerializedLayout(uint32_t name,
uintptr_t value, uintptr_t value,
...@@ -1145,6 +1157,8 @@ class DebugInfoSection : public DebugSection { ...@@ -1145,6 +1157,8 @@ class DebugInfoSection : public DebugSection {
UNIMPLEMENTED(); UNIMPLEMENTED();
#elif V8_TARGET_ARCH_PPC64 && V8_OS_LINUX #elif V8_TARGET_ARCH_PPC64 && V8_OS_LINUX
w->Write<uint8_t>(DW_OP_reg31); // The frame pointer is here on PPC64. 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 #else
#error Unsupported target architecture. #error Unsupported target architecture.
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment