Commit 8199a7ac authored by Wouter Vermeiren's avatar Wouter Vermeiren Committed by Commit Bot

[ppc64][ppc] Split up ARCH_PPC and ARCH_PPC64

After support for ARCH_PPC was dropped, it became a subset of
ARCH_PPC64. If you compile for ppc64, then you set the ARCH_PPC64
define which also sets the ARCH_PPC define.
To be able to again support ppc (32 bit) those defines should be
split up again.

This commit only splits up the defines but does not introduce a
working ARCH_PPC variant.

Bug: v8:10102
Change-Id: I64e0749f8e5a7dc078ee7890d92e57b82706a849
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1989826
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarMilad Farazmand <miladfar@ca.ibm.com>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66390}
parent 1a6df63f
...@@ -196,6 +196,7 @@ Vladimir Krivosheev <develar@gmail.com> ...@@ -196,6 +196,7 @@ Vladimir Krivosheev <develar@gmail.com>
Vladimir Shutoff <vovan@shutoff.ru> Vladimir Shutoff <vovan@shutoff.ru>
Wenlu Wang <kingwenlu@gmail.com> Wenlu Wang <kingwenlu@gmail.com>
Wiktor Garbacz <wiktor.garbacz@gmail.com> Wiktor Garbacz <wiktor.garbacz@gmail.com>
Wouter Vermeiren <wouter.vermeiren@essensium.com>
Xiaoyin Liu <xiaoyin.l@outlook.com> Xiaoyin Liu <xiaoyin.l@outlook.com>
Yannic Bonenberger <contact@yannic-bonenberger.com> Yannic Bonenberger <contact@yannic-bonenberger.com>
Yong Wang <ccyongwang@tencent.com> Yong Wang <ccyongwang@tencent.com>
......
...@@ -653,8 +653,9 @@ config("toolchain") { ...@@ -653,8 +653,9 @@ config("toolchain") {
} }
} }
if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") {
defines += [ "V8_TARGET_ARCH_PPC" ] if (v8_current_cpu == "ppc") {
if (v8_current_cpu == "ppc64") { defines += [ "V8_TARGET_ARCH_PPC" ]
} else if (v8_current_cpu == "ppc64") {
defines += [ "V8_TARGET_ARCH_PPC64" ] defines += [ "V8_TARGET_ARCH_PPC64" ]
} }
if (host_byteorder == "little") { if (host_byteorder == "little") {
...@@ -1656,11 +1657,16 @@ v8_source_set("v8_initializers") { ...@@ -1656,11 +1657,16 @@ v8_source_set("v8_initializers") {
### gcmole(arch:mips64el) ### ### gcmole(arch:mips64el) ###
"src/builtins/mips64/builtins-mips64.cc", "src/builtins/mips64/builtins-mips64.cc",
] ]
} else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { } else if (v8_current_cpu == "ppc") {
sources += [ sources += [
### gcmole(arch:ppc) ### ### gcmole(arch:ppc) ###
"src/builtins/ppc/builtins-ppc.cc", "src/builtins/ppc/builtins-ppc.cc",
] ]
} else if (v8_current_cpu == "ppc64") {
sources += [
### gcmole(arch:ppc64) ###
"src/builtins/ppc/builtins-ppc.cc",
]
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
sources += [ sources += [
### gcmole(arch:s390) ### ### gcmole(arch:s390) ###
...@@ -3284,7 +3290,7 @@ v8_source_set("v8_base_without_compiler") { ...@@ -3284,7 +3290,7 @@ v8_source_set("v8_base_without_compiler") {
"src/regexp/mips64/regexp-macro-assembler-mips64.h", "src/regexp/mips64/regexp-macro-assembler-mips64.h",
"src/wasm/baseline/mips64/liftoff-assembler-mips64.h", "src/wasm/baseline/mips64/liftoff-assembler-mips64.h",
] ]
} else if (v8_current_cpu == "ppc" || v8_current_cpu == "ppc64") { } else if (v8_current_cpu == "ppc") {
sources += [ ### gcmole(arch:ppc) ### sources += [ ### gcmole(arch:ppc) ###
"src/codegen/ppc/assembler-ppc-inl.h", "src/codegen/ppc/assembler-ppc-inl.h",
"src/codegen/ppc/assembler-ppc.cc", "src/codegen/ppc/assembler-ppc.cc",
...@@ -3314,6 +3320,36 @@ v8_source_set("v8_base_without_compiler") { ...@@ -3314,6 +3320,36 @@ v8_source_set("v8_base_without_compiler") {
"src/regexp/ppc/regexp-macro-assembler-ppc.h", "src/regexp/ppc/regexp-macro-assembler-ppc.h",
"src/wasm/baseline/ppc/liftoff-assembler-ppc.h", "src/wasm/baseline/ppc/liftoff-assembler-ppc.h",
] ]
} else if (v8_current_cpu == "ppc64") {
sources += [ ### gcmole(arch:ppc64) ###
"src/codegen/ppc/assembler-ppc-inl.h",
"src/codegen/ppc/assembler-ppc.cc",
"src/codegen/ppc/assembler-ppc.h",
"src/codegen/ppc/constants-ppc.cc",
"src/codegen/ppc/constants-ppc.h",
"src/codegen/ppc/cpu-ppc.cc",
"src/codegen/ppc/interface-descriptors-ppc.cc",
"src/codegen/ppc/macro-assembler-ppc.cc",
"src/codegen/ppc/macro-assembler-ppc.h",
"src/codegen/ppc/register-ppc.h",
"src/compiler/backend/ppc/code-generator-ppc.cc",
"src/compiler/backend/ppc/instruction-codes-ppc.h",
"src/compiler/backend/ppc/instruction-scheduler-ppc.cc",
"src/compiler/backend/ppc/instruction-selector-ppc.cc",
"src/compiler/backend/ppc/unwinding-info-writer-ppc.cc",
"src/compiler/backend/ppc/unwinding-info-writer-ppc.h",
"src/debug/ppc/debug-ppc.cc",
"src/deoptimizer/ppc/deoptimizer-ppc.cc",
"src/diagnostics/ppc/disasm-ppc.cc",
"src/diagnostics/ppc/eh-frame-ppc.cc",
"src/execution/ppc/frame-constants-ppc.cc",
"src/execution/ppc/frame-constants-ppc.h",
"src/execution/ppc/simulator-ppc.cc",
"src/execution/ppc/simulator-ppc.h",
"src/regexp/ppc/regexp-macro-assembler-ppc.cc",
"src/regexp/ppc/regexp-macro-assembler-ppc.h",
"src/wasm/baseline/ppc/liftoff-assembler-ppc.h",
]
} else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") { } else if (v8_current_cpu == "s390" || v8_current_cpu == "s390x") {
sources += [ ### gcmole(arch:s390) ### sources += [ ### gcmole(arch:s390) ###
"src/codegen/s390/assembler-s390-inl.h", "src/codegen/s390/assembler-s390-inl.h",
......
...@@ -33,13 +33,12 @@ ...@@ -33,13 +33,12 @@
#elif defined(__MIPSEB__) || defined(__MIPSEL__) #elif defined(__MIPSEB__) || defined(__MIPSEL__)
#define V8_HOST_ARCH_MIPS 1 #define V8_HOST_ARCH_MIPS 1
#define V8_HOST_ARCH_32_BIT 1 #define V8_HOST_ARCH_32_BIT 1
#elif defined(__PPC64__) || defined(_ARCH_PPC64)
#define V8_HOST_ARCH_PPC64 1
#define V8_HOST_ARCH_64_BIT 1
#elif defined(__PPC__) || defined(_ARCH_PPC) #elif defined(__PPC__) || defined(_ARCH_PPC)
#define V8_HOST_ARCH_PPC 1 #define V8_HOST_ARCH_PPC 1
#if defined(__PPC64__) || defined(_ARCH_PPC64)
#define V8_HOST_ARCH_64_BIT 1
#else
#define V8_HOST_ARCH_32_BIT 1 #define V8_HOST_ARCH_32_BIT 1
#endif
#elif defined(__s390__) || defined(__s390x__) #elif defined(__s390__) || defined(__s390x__)
#define V8_HOST_ARCH_S390 1 #define V8_HOST_ARCH_S390 1
#if defined(__s390x__) #if defined(__s390x__)
...@@ -78,7 +77,7 @@ ...@@ -78,7 +77,7 @@
// environment as presented by the compiler. // environment as presented by the compiler.
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && \ #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && \
!V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64 && \ !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS && !V8_TARGET_ARCH_MIPS64 && \
!V8_TARGET_ARCH_PPC && !V8_TARGET_ARCH_S390 !V8_TARGET_ARCH_PPC && !V8_TARGET_ARCH_PPC64 && !V8_TARGET_ARCH_S390
#if defined(_M_X64) || defined(__x86_64__) #if defined(_M_X64) || defined(__x86_64__)
#define V8_TARGET_ARCH_X64 1 #define V8_TARGET_ARCH_X64 1
#elif defined(_M_IX86) || defined(__i386__) #elif defined(_M_IX86) || defined(__i386__)
...@@ -91,6 +90,8 @@ ...@@ -91,6 +90,8 @@
#define V8_TARGET_ARCH_MIPS64 1 #define V8_TARGET_ARCH_MIPS64 1
#elif defined(__MIPSEB__) || defined(__MIPSEL__) #elif defined(__MIPSEB__) || defined(__MIPSEL__)
#define V8_TARGET_ARCH_MIPS 1 #define V8_TARGET_ARCH_MIPS 1
#elif defined(_ARCH_PPC64)
#define V8_TARGET_ARCH_PPC64 1
#elif defined(_ARCH_PPC) #elif defined(_ARCH_PPC)
#define V8_TARGET_ARCH_PPC 1 #define V8_TARGET_ARCH_PPC 1
#else #else
...@@ -118,11 +119,9 @@ ...@@ -118,11 +119,9 @@
#elif V8_TARGET_ARCH_MIPS64 #elif V8_TARGET_ARCH_MIPS64
#define V8_TARGET_ARCH_64_BIT 1 #define V8_TARGET_ARCH_64_BIT 1
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC
#if V8_TARGET_ARCH_PPC64
#define V8_TARGET_ARCH_64_BIT 1
#else
#define V8_TARGET_ARCH_32_BIT 1 #define V8_TARGET_ARCH_32_BIT 1
#endif #elif V8_TARGET_ARCH_PPC64
#define V8_TARGET_ARCH_64_BIT 1
#elif V8_TARGET_ARCH_S390 #elif V8_TARGET_ARCH_S390
#if V8_TARGET_ARCH_S390X #if V8_TARGET_ARCH_S390X
#define V8_TARGET_ARCH_64_BIT 1 #define V8_TARGET_ARCH_64_BIT 1
......
...@@ -17,7 +17,7 @@ extern "C" char** environ; ...@@ -17,7 +17,7 @@ extern "C" char** environ;
#if V8_OS_QNX #if V8_OS_QNX
#include <sys/syspage.h> // cpuinfo #include <sys/syspage.h> // cpuinfo
#endif #endif
#if (V8_OS_LINUX && V8_HOST_ARCH_PPC) || V8_OS_ANDROID #if (V8_OS_LINUX && (V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64)) || V8_OS_ANDROID
#include <elf.h> #include <elf.h>
#endif #endif
#if V8_OS_AIX #if V8_OS_AIX
...@@ -602,7 +602,7 @@ CPU::CPU() ...@@ -602,7 +602,7 @@ CPU::CPU()
#elif V8_HOST_ARCH_ARM64 #elif V8_HOST_ARCH_ARM64
// Implementer, variant and part are currently unused under ARM64. // Implementer, variant and part are currently unused under ARM64.
#elif V8_HOST_ARCH_PPC #elif V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64
#ifndef USE_SIMULATOR #ifndef USE_SIMULATOR
#if V8_OS_LINUX #if V8_OS_LINUX
...@@ -671,7 +671,7 @@ CPU::CPU() ...@@ -671,7 +671,7 @@ CPU::CPU()
} }
#endif // V8_OS_AIX #endif // V8_OS_AIX
#endif // !USE_SIMULATOR #endif // !USE_SIMULATOR
#endif // V8_HOST_ARCH_PPC #endif // V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64
} }
} // namespace base } // namespace base
......
...@@ -464,7 +464,7 @@ void OS::DebugBreak() { ...@@ -464,7 +464,7 @@ void OS::DebugBreak() {
asm("break"); asm("break");
#elif V8_HOST_ARCH_MIPS64 #elif V8_HOST_ARCH_MIPS64
asm("break"); asm("break");
#elif V8_HOST_ARCH_PPC #elif V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64
asm("twge 2,2"); asm("twge 2,2");
#elif V8_HOST_ARCH_IA32 #elif V8_HOST_ARCH_IA32
asm("int $3"); asm("int $3");
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#if V8_TARGET_ARCH_PPC #if V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/api/api-arguments.h" #include "src/api/api-arguments.h"
#include "src/codegen/code-factory.h" #include "src/codegen/code-factory.h"
...@@ -3285,4 +3285,4 @@ void Builtins::Generate_DirectCEntry(MacroAssembler* masm) { ...@@ -3285,4 +3285,4 @@ void Builtins::Generate_DirectCEntry(MacroAssembler* masm) {
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
#endif // V8_TARGET_ARCH_PPC #endif // V8_TARGET_ARCH_PPC64 || V8_TARGET_ARCH_PPC64
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "src/codegen/arm64/assembler-arm64.h" #include "src/codegen/arm64/assembler-arm64.h"
#elif V8_TARGET_ARCH_ARM #elif V8_TARGET_ARCH_ARM
#include "src/codegen/arm/assembler-arm.h" #include "src/codegen/arm/assembler-arm.h"
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/codegen/ppc/assembler-ppc.h" #include "src/codegen/ppc/assembler-ppc.h"
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
#include "src/codegen/mips/assembler-mips.h" #include "src/codegen/mips/assembler-mips.h"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "src/codegen/arm64/assembler-arm64-inl.h" #include "src/codegen/arm64/assembler-arm64-inl.h"
#elif V8_TARGET_ARCH_ARM #elif V8_TARGET_ARCH_ARM
#include "src/codegen/arm/assembler-arm-inl.h" #include "src/codegen/arm/assembler-arm-inl.h"
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/codegen/ppc/assembler-ppc-inl.h" #include "src/codegen/ppc/assembler-ppc-inl.h"
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
#include "src/codegen/mips/assembler-mips-inl.h" #include "src/codegen/mips/assembler-mips-inl.h"
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
#if defined(V8_TARGET_ARCH_PPC) #if defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_PPC64)
ConstantPoolBuilder::ConstantPoolBuilder(int ptr_reach_bits, ConstantPoolBuilder::ConstantPoolBuilder(int ptr_reach_bits,
int double_reach_bits) { int double_reach_bits) {
...@@ -209,7 +209,7 @@ int ConstantPoolBuilder::Emit(Assembler* assm) { ...@@ -209,7 +209,7 @@ int ConstantPoolBuilder::Emit(Assembler* assm) {
return !empty ? (assm->pc_offset() - emitted_label_.pos()) : 0; return !empty ? (assm->pc_offset() - emitted_label_.pos()) : 0;
} }
#endif // defined(V8_TARGET_ARCH_PPC) #endif // defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_PPC64)
#if defined(V8_TARGET_ARCH_ARM64) #if defined(V8_TARGET_ARCH_ARM64)
......
...@@ -81,7 +81,7 @@ class ConstantPoolEntry { ...@@ -81,7 +81,7 @@ class ConstantPoolEntry {
enum { SHARING_PROHIBITED = -2, SHARING_ALLOWED = -1 }; enum { SHARING_PROHIBITED = -2, SHARING_ALLOWED = -1 };
}; };
#if defined(V8_TARGET_ARCH_PPC) #if defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_PPC64)
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Embedded constant pool support // Embedded constant pool support
...@@ -161,7 +161,7 @@ class ConstantPoolBuilder { ...@@ -161,7 +161,7 @@ class ConstantPoolBuilder {
PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES];
}; };
#endif // defined(V8_TARGET_ARCH_PPC) #endif // defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_PPC64)
#if defined(V8_TARGET_ARCH_ARM64) #if defined(V8_TARGET_ARCH_ARM64)
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "src/codegen/mips/constants-mips.h" // NOLINT #include "src/codegen/mips/constants-mips.h" // NOLINT
#elif V8_TARGET_ARCH_MIPS64 #elif V8_TARGET_ARCH_MIPS64
#include "src/codegen/mips64/constants-mips64.h" // NOLINT #include "src/codegen/mips64/constants-mips64.h" // NOLINT
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/codegen/ppc/constants-ppc.h" // NOLINT #include "src/codegen/ppc/constants-ppc.h" // NOLINT
#elif V8_TARGET_ARCH_S390 #elif V8_TARGET_ARCH_S390
#include "src/codegen/s390/constants-s390.h" // NOLINT #include "src/codegen/s390/constants-s390.h" // NOLINT
......
...@@ -47,7 +47,7 @@ enum CpuFeature { ...@@ -47,7 +47,7 @@ enum CpuFeature {
MIPSr6, MIPSr6,
MIPS_SIMD, // MSA instructions MIPS_SIMD, // MSA instructions
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
FPU, FPU,
FPR_GPR_MOV, FPR_GPR_MOV,
LWSYNC, LWSYNC,
......
...@@ -465,7 +465,7 @@ ExternalReference ExternalReference::invoke_accessor_getter_callback() { ...@@ -465,7 +465,7 @@ ExternalReference ExternalReference::invoke_accessor_getter_callback() {
#define re_stack_check_func RegExpMacroAssemblerARM64::CheckStackGuardState #define re_stack_check_func RegExpMacroAssemblerARM64::CheckStackGuardState
#elif V8_TARGET_ARCH_ARM #elif V8_TARGET_ARCH_ARM
#define re_stack_check_func RegExpMacroAssemblerARM::CheckStackGuardState #define re_stack_check_func RegExpMacroAssemblerARM::CheckStackGuardState
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#define re_stack_check_func RegExpMacroAssemblerPPC::CheckStackGuardState #define re_stack_check_func RegExpMacroAssemblerPPC::CheckStackGuardState
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
#define re_stack_check_func RegExpMacroAssemblerMIPS::CheckStackGuardState #define re_stack_check_func RegExpMacroAssemblerMIPS::CheckStackGuardState
......
...@@ -40,7 +40,7 @@ enum AllocationFlags { ...@@ -40,7 +40,7 @@ enum AllocationFlags {
#elif V8_TARGET_ARCH_ARM #elif V8_TARGET_ARCH_ARM
#include "src/codegen/arm/constants-arm.h" #include "src/codegen/arm/constants-arm.h"
#include "src/codegen/arm/macro-assembler-arm.h" #include "src/codegen/arm/macro-assembler-arm.h"
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/codegen/ppc/constants-ppc.h" #include "src/codegen/ppc/constants-ppc.h"
#include "src/codegen/ppc/macro-assembler-ppc.h" #include "src/codegen/ppc/macro-assembler-ppc.h"
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "src/codegen/ppc/assembler-ppc.h" #include "src/codegen/ppc/assembler-ppc.h"
#if V8_TARGET_ARCH_PPC #if V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/base/bits.h" #include "src/base/bits.h"
#include "src/base/cpu.h" #include "src/base/cpu.h"
...@@ -1960,4 +1960,4 @@ Register UseScratchRegisterScope::Acquire() { ...@@ -1960,4 +1960,4 @@ Register UseScratchRegisterScope::Acquire() {
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
#endif // V8_TARGET_ARCH_PPC #endif // V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#if V8_TARGET_ARCH_PPC #if V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/codegen/ppc/constants-ppc.h" #include "src/codegen/ppc/constants-ppc.h"
...@@ -46,4 +46,4 @@ int Registers::Number(const char* name) { ...@@ -46,4 +46,4 @@ int Registers::Number(const char* name) {
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
#endif // V8_TARGET_ARCH_PPC #endif // V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#define UNIMPLEMENTED_PPC() #define UNIMPLEMENTED_PPC()
#endif #endif
#if V8_HOST_ARCH_PPC && \ #if (V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64) && \
(V8_OS_AIX || (V8_TARGET_ARCH_PPC64 && V8_TARGET_BIG_ENDIAN && \ (V8_OS_AIX || (V8_TARGET_ARCH_PPC64 && V8_TARGET_BIG_ENDIAN && \
(!defined(_CALL_ELF) || _CALL_ELF == 1))) (!defined(_CALL_ELF) || _CALL_ELF == 1)))
#define ABI_USES_FUNCTION_DESCRIPTORS 1 #define ABI_USES_FUNCTION_DESCRIPTORS 1
...@@ -28,28 +28,30 @@ ...@@ -28,28 +28,30 @@
#define ABI_USES_FUNCTION_DESCRIPTORS 0 #define ABI_USES_FUNCTION_DESCRIPTORS 0
#endif #endif
#if !V8_HOST_ARCH_PPC || V8_OS_AIX || V8_TARGET_ARCH_PPC64 #if !(V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64) || V8_OS_AIX || \
V8_TARGET_ARCH_PPC64
#define ABI_PASSES_HANDLES_IN_REGS 1 #define ABI_PASSES_HANDLES_IN_REGS 1
#else #else
#define ABI_PASSES_HANDLES_IN_REGS 0 #define ABI_PASSES_HANDLES_IN_REGS 0
#endif #endif
#if !V8_HOST_ARCH_PPC || !V8_TARGET_ARCH_PPC64 || V8_TARGET_LITTLE_ENDIAN || \ #if !(V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64) || !V8_TARGET_ARCH_PPC64 || \
(defined(_CALL_ELF) && _CALL_ELF == 2) V8_TARGET_LITTLE_ENDIAN || (defined(_CALL_ELF) && _CALL_ELF == 2)
#define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 1 #define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 1
#else #else
#define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 0 #define ABI_RETURNS_OBJECT_PAIRS_IN_REGS 0
#endif #endif
#if !V8_HOST_ARCH_PPC || \ #if !(V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64) || \
(V8_TARGET_ARCH_PPC64 && \ (V8_TARGET_ARCH_PPC64 && \
(V8_TARGET_LITTLE_ENDIAN || (defined(_CALL_ELF) && _CALL_ELF == 2))) (V8_TARGET_LITTLE_ENDIAN || (defined(_CALL_ELF) && _CALL_ELF == 2)))
#define ABI_CALL_VIA_IP 1 #define ABI_CALL_VIA_IP 1
#else #else
#define ABI_CALL_VIA_IP 0 #define ABI_CALL_VIA_IP 0
#endif #endif
#if !V8_HOST_ARCH_PPC || V8_OS_AIX || V8_TARGET_ARCH_PPC64 #if !(V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64) || V8_OS_AIX || \
V8_TARGET_ARCH_PPC64
#define ABI_TOC_REGISTER 2 #define ABI_TOC_REGISTER 2
#else #else
#define ABI_TOC_REGISTER 13 #define ABI_TOC_REGISTER 13
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// CPU specific code for ppc independent of OS goes here. // CPU specific code for ppc independent of OS goes here.
#if V8_TARGET_ARCH_PPC #if V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/codegen/cpu-features.h" #include "src/codegen/cpu-features.h"
...@@ -47,4 +47,4 @@ void CpuFeatures::FlushICache(void* buffer, size_t size) { ...@@ -47,4 +47,4 @@ void CpuFeatures::FlushICache(void* buffer, size_t size) {
} // namespace v8 } // namespace v8
#undef INSTR_AND_DATA_CACHE_COHERENCY #undef INSTR_AND_DATA_CACHE_COHERENCY
#endif // V8_TARGET_ARCH_PPC #endif // V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#if V8_TARGET_ARCH_PPC #if V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/codegen/interface-descriptors.h" #include "src/codegen/interface-descriptors.h"
...@@ -286,4 +286,4 @@ void RunMicrotasksEntryDescriptor::InitializePlatformSpecific( ...@@ -286,4 +286,4 @@ void RunMicrotasksEntryDescriptor::InitializePlatformSpecific(
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
#endif // V8_TARGET_ARCH_PPC #endif // V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <assert.h> // For assert #include <assert.h> // For assert
#include <limits.h> // For LONG_MIN, LONG_MAX. #include <limits.h> // For LONG_MIN, LONG_MAX.
#if V8_TARGET_ARCH_PPC #if V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/base/bits.h" #include "src/base/bits.h"
#include "src/base/division-by-constant.h" #include "src/base/division-by-constant.h"
...@@ -3041,4 +3041,4 @@ void TurboAssembler::DebugBreak() { stop(); } ...@@ -3041,4 +3041,4 @@ void TurboAssembler::DebugBreak() { stop(); }
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
#endif // V8_TARGET_ARCH_PPC #endif // V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "src/codegen/arm64/register-arm64.h" #include "src/codegen/arm64/register-arm64.h"
#elif V8_TARGET_ARCH_ARM #elif V8_TARGET_ARCH_ARM
#include "src/codegen/arm/register-arm.h" #include "src/codegen/arm/register-arm.h"
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/codegen/ppc/register-ppc.h" #include "src/codegen/ppc/register-ppc.h"
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
#include "src/codegen/mips/register-mips.h" #include "src/codegen/mips/register-mips.h"
......
...@@ -60,6 +60,8 @@ static int get_num_allocatable_double_registers() { ...@@ -60,6 +60,8 @@ static int get_num_allocatable_double_registers() {
kMaxAllocatableDoubleRegisterCount; kMaxAllocatableDoubleRegisterCount;
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC
kMaxAllocatableDoubleRegisterCount; kMaxAllocatableDoubleRegisterCount;
#elif V8_TARGET_ARCH_PPC64
kMaxAllocatableDoubleRegisterCount;
#elif V8_TARGET_ARCH_S390 #elif V8_TARGET_ARCH_S390
kMaxAllocatableDoubleRegisterCount; kMaxAllocatableDoubleRegisterCount;
#else #else
......
...@@ -329,7 +329,7 @@ bool RelocInfo::OffHeapTargetIsCodedSpecially() { ...@@ -329,7 +329,7 @@ bool RelocInfo::OffHeapTargetIsCodedSpecially() {
return false; return false;
#elif defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_MIPS) || \ #elif defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_MIPS) || \
defined(V8_TARGET_ARCH_MIPS64) || defined(V8_TARGET_ARCH_PPC) || \ defined(V8_TARGET_ARCH_MIPS64) || defined(V8_TARGET_ARCH_PPC) || \
defined(V8_TARGET_ARCH_S390) defined(V8_TARGET_ARCH_PPC64) || defined(V8_TARGET_ARCH_S390)
return true; return true;
#endif #endif
} }
......
...@@ -46,6 +46,9 @@ constexpr int GB = MB * 1024; ...@@ -46,6 +46,9 @@ constexpr int GB = MB * 1024;
#if (V8_TARGET_ARCH_PPC && !V8_HOST_ARCH_PPC) #if (V8_TARGET_ARCH_PPC && !V8_HOST_ARCH_PPC)
#define USE_SIMULATOR 1 #define USE_SIMULATOR 1
#endif #endif
#if (V8_TARGET_ARCH_PPC64 && !V8_HOST_ARCH_PPC64)
#define USE_SIMULATOR 1
#endif
#if (V8_TARGET_ARCH_MIPS && !V8_HOST_ARCH_MIPS) #if (V8_TARGET_ARCH_MIPS && !V8_HOST_ARCH_MIPS)
#define USE_SIMULATOR 1 #define USE_SIMULATOR 1
#endif #endif
...@@ -59,7 +62,7 @@ constexpr int GB = MB * 1024; ...@@ -59,7 +62,7 @@ constexpr int GB = MB * 1024;
// Determine whether the architecture uses an embedded constant pool // Determine whether the architecture uses an embedded constant pool
// (contiguous constant pool embedded in code object). // (contiguous constant pool embedded in code object).
#if V8_TARGET_ARCH_PPC #if V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#define V8_EMBEDDED_CONSTANT_POOL true #define V8_EMBEDDED_CONSTANT_POOL true
#else #else
#define V8_EMBEDDED_CONSTANT_POOL false #define V8_EMBEDDED_CONSTANT_POOL false
...@@ -192,7 +195,8 @@ constexpr int kSystemPointerSizeLog2 = 3; ...@@ -192,7 +195,8 @@ constexpr int kSystemPointerSizeLog2 = 3;
constexpr intptr_t kIntptrSignBit = constexpr intptr_t kIntptrSignBit =
static_cast<intptr_t>(uintptr_t{0x8000000000000000}); static_cast<intptr_t>(uintptr_t{0x8000000000000000});
constexpr bool kPlatformRequiresCodeRange = true; constexpr bool kPlatformRequiresCodeRange = true;
#if V8_HOST_ARCH_PPC && V8_TARGET_ARCH_PPC && V8_OS_LINUX #if (V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64) && \
(V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64) && V8_OS_LINUX
constexpr size_t kMaximalCodeRangeSize = 512 * MB; constexpr size_t kMaximalCodeRangeSize = 512 * MB;
constexpr size_t kMinExpectedOSPageSize = 64 * KB; // OS page on PPC Linux constexpr size_t kMinExpectedOSPageSize = 64 * KB; // OS page on PPC Linux
#elif V8_TARGET_ARCH_ARM64 #elif V8_TARGET_ARCH_ARM64
...@@ -212,7 +216,8 @@ constexpr size_t kReservedCodeRangePages = 0; ...@@ -212,7 +216,8 @@ constexpr size_t kReservedCodeRangePages = 0;
#else #else
constexpr int kSystemPointerSizeLog2 = 2; constexpr int kSystemPointerSizeLog2 = 2;
constexpr intptr_t kIntptrSignBit = 0x80000000; constexpr intptr_t kIntptrSignBit = 0x80000000;
#if V8_HOST_ARCH_PPC && V8_TARGET_ARCH_PPC && V8_OS_LINUX #if (V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64) && \
(V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64) && V8_OS_LINUX
constexpr bool kPlatformRequiresCodeRange = false; constexpr bool kPlatformRequiresCodeRange = false;
constexpr size_t kMaximalCodeRangeSize = 0 * MB; constexpr size_t kMaximalCodeRangeSize = 0 * MB;
constexpr size_t kMinimumCodeRangeSize = 0 * MB; constexpr size_t kMinimumCodeRangeSize = 0 * MB;
...@@ -342,7 +347,7 @@ F FUNCTION_CAST(Address addr) { ...@@ -342,7 +347,7 @@ F FUNCTION_CAST(Address addr) {
// Determine whether the architecture uses function descriptors // Determine whether the architecture uses function descriptors
// which provide a level of indirection between the function pointer // which provide a level of indirection between the function pointer
// and the function entrypoint. // and the function entrypoint.
#if V8_HOST_ARCH_PPC && \ #if (V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64) && \
(V8_OS_AIX || (V8_TARGET_ARCH_PPC64 && V8_TARGET_BIG_ENDIAN && \ (V8_OS_AIX || (V8_TARGET_ARCH_PPC64 && V8_TARGET_BIG_ENDIAN && \
(!defined(_CALL_ELF) || _CALL_ELF == 1))) (!defined(_CALL_ELF) || _CALL_ELF == 1)))
#define USES_FUNCTION_DESCRIPTORS 1 #define USES_FUNCTION_DESCRIPTORS 1
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "src/compiler/backend/mips64/instruction-codes-mips64.h" #include "src/compiler/backend/mips64/instruction-codes-mips64.h"
#elif V8_TARGET_ARCH_X64 #elif V8_TARGET_ARCH_X64
#include "src/compiler/backend/x64/instruction-codes-x64.h" #include "src/compiler/backend/x64/instruction-codes-x64.h"
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/compiler/backend/ppc/instruction-codes-ppc.h" #include "src/compiler/backend/ppc/instruction-codes-ppc.h"
#elif V8_TARGET_ARCH_S390 #elif V8_TARGET_ARCH_S390
#include "src/compiler/backend/s390/instruction-codes-s390.h" #include "src/compiler/backend/s390/instruction-codes-s390.h"
......
...@@ -2583,7 +2583,7 @@ void InstructionSelector::VisitWord32AtomicPairCompareExchange(Node* node) { ...@@ -2583,7 +2583,7 @@ void InstructionSelector::VisitWord32AtomicPairCompareExchange(Node* node) {
#endif // !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS #endif // !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_MIPS
#if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS64 && \ #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS64 && \
!V8_TARGET_ARCH_S390 && !V8_TARGET_ARCH_PPC !V8_TARGET_ARCH_S390 && !V8_TARGET_ARCH_PPC64
void InstructionSelector::VisitWord64AtomicLoad(Node* node) { UNIMPLEMENTED(); } void InstructionSelector::VisitWord64AtomicLoad(Node* node) { UNIMPLEMENTED(); }
void InstructionSelector::VisitWord64AtomicStore(Node* node) { void InstructionSelector::VisitWord64AtomicStore(Node* node) {
...@@ -2607,7 +2607,7 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) { ...@@ -2607,7 +2607,7 @@ void InstructionSelector::VisitWord64AtomicExchange(Node* node) {
void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) { void InstructionSelector::VisitWord64AtomicCompareExchange(Node* node) {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
#endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_PPC #endif // !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_PPC64
// !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_S390 // !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_S390
#if !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM #if !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "src/compiler/backend/x64/unwinding-info-writer-x64.h" #include "src/compiler/backend/x64/unwinding-info-writer-x64.h"
#elif V8_TARGET_ARCH_S390X #elif V8_TARGET_ARCH_S390X
#include "src/compiler/backend/s390/unwinding-info-writer-s390.h" #include "src/compiler/backend/s390/unwinding-info-writer-s390.h"
#elif V8_TARGET_ARCH_PPC64 #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/compiler/backend/ppc/unwinding-info-writer-ppc.h" #include "src/compiler/backend/ppc/unwinding-info-writer-ppc.h"
#else #else
......
...@@ -1066,7 +1066,8 @@ void DebugEvaluate::VerifyTransitiveBuiltins(Isolate* isolate) { ...@@ -1066,7 +1066,8 @@ void DebugEvaluate::VerifyTransitiveBuiltins(Isolate* isolate) {
} }
} }
CHECK(!failed); CHECK(!failed);
#if defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_MIPS64) #if defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_PPC64) || \
defined(V8_TARGET_ARCH_MIPS64)
// Isolate-independent builtin calls and jumps do not emit reloc infos // Isolate-independent builtin calls and jumps do not emit reloc infos
// on PPC. We try to avoid using PC relative code due to performance // on PPC. We try to avoid using PC relative code due to performance
// issue with especially older hardwares. // issue with especially older hardwares.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#if V8_TARGET_ARCH_PPC #if V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/debug/debug.h" #include "src/debug/debug.h"
...@@ -50,4 +50,4 @@ const bool LiveEdit::kFrameDropperSupported = true; ...@@ -50,4 +50,4 @@ const bool LiveEdit::kFrameDropperSupported = true;
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
#endif // V8_TARGET_ARCH_PPC #endif // V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#if V8_TARGET_ARCH_PPC #if V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/base/platform/platform.h" #include "src/base/platform/platform.h"
#include "src/codegen/macro-assembler.h" #include "src/codegen/macro-assembler.h"
...@@ -1519,4 +1519,4 @@ void Disassembler::Disassemble(FILE* f, byte* begin, byte* end, ...@@ -1519,4 +1519,4 @@ void Disassembler::Disassemble(FILE* f, byte* begin, byte* end,
} // namespace disasm } // namespace disasm
#endif // V8_TARGET_ARCH_PPC #endif // V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
...@@ -376,7 +376,7 @@ inline static int FrameSlotToFPOffset(int slot) { ...@@ -376,7 +376,7 @@ inline static int FrameSlotToFPOffset(int slot) {
#include "src/execution/arm64/frame-constants-arm64.h" // NOLINT #include "src/execution/arm64/frame-constants-arm64.h" // NOLINT
#elif V8_TARGET_ARCH_ARM #elif V8_TARGET_ARCH_ARM
#include "src/execution/arm/frame-constants-arm.h" // NOLINT #include "src/execution/arm/frame-constants-arm.h" // NOLINT
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/execution/ppc/frame-constants-ppc.h" // NOLINT #include "src/execution/ppc/frame-constants-ppc.h" // NOLINT
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
#include "src/execution/mips/frame-constants-mips.h" // NOLINT #include "src/execution/mips/frame-constants-mips.h" // NOLINT
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#if V8_TARGET_ARCH_PPC #if V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/execution/ppc/frame-constants-ppc.h" #include "src/execution/ppc/frame-constants-ppc.h"
...@@ -32,4 +32,4 @@ int BuiltinContinuationFrameConstants::PaddingSlotCount(int register_count) { ...@@ -32,4 +32,4 @@ int BuiltinContinuationFrameConstants::PaddingSlotCount(int register_count) {
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
#endif // V8_TARGET_ARCH_PPC #endif // V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
...@@ -121,6 +121,7 @@ class SimulatorBase { ...@@ -121,6 +121,7 @@ class SimulatorBase {
// - V8_TARGET_ARCH_MIPS: swi (software-interrupt) // - V8_TARGET_ARCH_MIPS: swi (software-interrupt)
// - V8_TARGET_ARCH_MIPS64: swi (software-interrupt) // - V8_TARGET_ARCH_MIPS64: swi (software-interrupt)
// - V8_TARGET_ARCH_PPC: svc (Supervisor Call) // - V8_TARGET_ARCH_PPC: svc (Supervisor Call)
// - V8_TARGET_ARCH_PPC64: svc (Supervisor Call)
// - V8_TARGET_ARCH_S390: svc (Supervisor Call) // - V8_TARGET_ARCH_S390: svc (Supervisor Call)
class Redirection { class Redirection {
public: public:
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "src/execution/arm64/simulator-arm64.h" #include "src/execution/arm64/simulator-arm64.h"
#elif V8_TARGET_ARCH_ARM #elif V8_TARGET_ARCH_ARM
#include "src/execution/arm/simulator-arm.h" #include "src/execution/arm/simulator-arm.h"
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/execution/ppc/simulator-ppc.h" #include "src/execution/ppc/simulator-ppc.h"
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
#include "src/execution/mips/simulator-mips.h" #include "src/execution/mips/simulator-mips.h"
......
...@@ -1475,7 +1475,8 @@ bool InterpreterAssembler::TargetSupportsUnalignedAccess() { ...@@ -1475,7 +1475,8 @@ bool InterpreterAssembler::TargetSupportsUnalignedAccess() {
#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 #if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64
return false; return false;
#elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_S390 || \ #elif V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_S390 || \
V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_PPC V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_PPC || \
V8_TARGET_ARCH_PPC64
return true; return true;
#else #else
#error "Unknown Architecture" #error "Unknown Architecture"
......
...@@ -372,7 +372,9 @@ void SignalHandler::HandleProfilerSignal(int signal, siginfo_t* info, ...@@ -372,7 +372,9 @@ void SignalHandler::HandleProfilerSignal(int signal, siginfo_t* info,
void SignalHandler::FillRegisterState(void* context, RegisterState* state) { void SignalHandler::FillRegisterState(void* context, RegisterState* state) {
// Extracting the sample from the context is extremely machine dependent. // Extracting the sample from the context is extremely machine dependent.
ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context); ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context);
#if !(V8_OS_OPENBSD || (V8_OS_LINUX && (V8_HOST_ARCH_PPC || V8_HOST_ARCH_S390))) #if !(V8_OS_OPENBSD || \
(V8_OS_LINUX && \
(V8_HOST_ARCH_PPC || V8_HOST_ARCH_S390 || V8_HOST_ARCH_PPC64)))
mcontext_t& mcontext = ucontext->uc_mcontext; mcontext_t& mcontext = ucontext->uc_mcontext;
#endif #endif
#if V8_OS_LINUX #if V8_OS_LINUX
...@@ -413,7 +415,7 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) { ...@@ -413,7 +415,7 @@ void SignalHandler::FillRegisterState(void* context, RegisterState* state) {
state->pc = reinterpret_cast<void*>(mcontext.pc); state->pc = reinterpret_cast<void*>(mcontext.pc);
state->sp = reinterpret_cast<void*>(mcontext.gregs[29]); state->sp = reinterpret_cast<void*>(mcontext.gregs[29]);
state->fp = reinterpret_cast<void*>(mcontext.gregs[30]); state->fp = reinterpret_cast<void*>(mcontext.gregs[30]);
#elif V8_HOST_ARCH_PPC #elif V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64
#if V8_LIBC_GLIBC #if V8_LIBC_GLIBC
state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.regs->nip); state->pc = reinterpret_cast<void*>(ucontext->uc_mcontext.regs->nip);
state->sp = state->sp =
......
...@@ -584,6 +584,8 @@ void LowLevelLogger::LogCodeInfo() { ...@@ -584,6 +584,8 @@ void LowLevelLogger::LogCodeInfo() {
const char arch[] = "arm"; const char arch[] = "arm";
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC
const char arch[] = "ppc"; const char arch[] = "ppc";
#elif V8_TARGET_ARCH_PPC64
const char arch[] = "ppc64";
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
const char arch[] = "mips"; const char arch[] = "mips";
#elif V8_TARGET_ARCH_ARM64 #elif V8_TARGET_ARCH_ARM64
......
...@@ -110,7 +110,7 @@ bool SimulatorHelper::FillRegisters(Isolate* isolate, ...@@ -110,7 +110,7 @@ bool SimulatorHelper::FillRegisters(Isolate* isolate,
} }
state->sp = reinterpret_cast<void*>(simulator->get_register(Simulator::sp)); state->sp = reinterpret_cast<void*>(simulator->get_register(Simulator::sp));
state->fp = reinterpret_cast<void*>(simulator->get_register(Simulator::fp)); state->fp = reinterpret_cast<void*>(simulator->get_register(Simulator::fp));
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
if (!simulator->has_bad_pc()) { if (!simulator->has_bad_pc()) {
state->pc = reinterpret_cast<void*>(simulator->get_pc()); state->pc = reinterpret_cast<void*>(simulator->get_pc());
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#if V8_TARGET_ARCH_PPC #if V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/regexp/ppc/regexp-macro-assembler-ppc.h" #include "src/regexp/ppc/regexp-macro-assembler-ppc.h"
...@@ -1371,4 +1371,4 @@ void RegExpMacroAssemblerPPC::LoadCurrentCharacterUnchecked(int cp_offset, ...@@ -1371,4 +1371,4 @@ void RegExpMacroAssemblerPPC::LoadCurrentCharacterUnchecked(int cp_offset,
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
#endif // V8_TARGET_ARCH_PPC #endif // V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "src/regexp/arm64/regexp-macro-assembler-arm64.h" #include "src/regexp/arm64/regexp-macro-assembler-arm64.h"
#elif V8_TARGET_ARCH_ARM #elif V8_TARGET_ARCH_ARM
#include "src/regexp/arm/regexp-macro-assembler-arm.h" #include "src/regexp/arm/regexp-macro-assembler-arm.h"
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/regexp/ppc/regexp-macro-assembler-ppc.h" #include "src/regexp/ppc/regexp-macro-assembler-ppc.h"
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
#include "src/regexp/mips/regexp-macro-assembler-mips.h" #include "src/regexp/mips/regexp-macro-assembler-mips.h"
......
...@@ -839,7 +839,7 @@ bool RegExpImpl::Compile(Isolate* isolate, Zone* zone, RegExpCompileData* data, ...@@ -839,7 +839,7 @@ bool RegExpImpl::Compile(Isolate* isolate, Zone* zone, RegExpCompileData* data,
#elif V8_TARGET_ARCH_S390 #elif V8_TARGET_ARCH_S390
macro_assembler.reset(new RegExpMacroAssemblerS390( macro_assembler.reset(new RegExpMacroAssemblerS390(
isolate, zone, mode, (data->capture_count + 1) * 2)); isolate, zone, mode, (data->capture_count + 1) * 2));
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
macro_assembler.reset(new RegExpMacroAssemblerPPC( macro_assembler.reset(new RegExpMacroAssemblerPPC(
isolate, zone, mode, (data->capture_count + 1) * 2)); isolate, zone, mode, (data->capture_count + 1) * 2));
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
......
...@@ -29,7 +29,7 @@ class Object; ...@@ -29,7 +29,7 @@ class Object;
// of objects found in code. // of objects found in code.
#if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64) || \ #if defined(V8_TARGET_ARCH_MIPS) || defined(V8_TARGET_ARCH_MIPS64) || \
defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_S390) || \ defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_S390) || \
V8_EMBEDDED_CONSTANT_POOL defined(V8_TARGET_ARCH_PPC64) || V8_EMBEDDED_CONSTANT_POOL
#define V8_CODE_EMBEDS_OBJECT_POINTER 1 #define V8_CODE_EMBEDS_OBJECT_POINTER 1
#else #else
#define V8_CODE_EMBEDS_OBJECT_POINTER 0 #define V8_CODE_EMBEDS_OBJECT_POINTER 0
......
...@@ -928,7 +928,7 @@ class LiftoffStackSlots { ...@@ -928,7 +928,7 @@ class LiftoffStackSlots {
#include "src/wasm/baseline/arm64/liftoff-assembler-arm64.h" #include "src/wasm/baseline/arm64/liftoff-assembler-arm64.h"
#elif V8_TARGET_ARCH_ARM #elif V8_TARGET_ARCH_ARM
#include "src/wasm/baseline/arm/liftoff-assembler-arm.h" #include "src/wasm/baseline/arm/liftoff-assembler-arm.h"
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
#include "src/wasm/baseline/ppc/liftoff-assembler-ppc.h" #include "src/wasm/baseline/ppc/liftoff-assembler-ppc.h"
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
#include "src/wasm/baseline/mips/liftoff-assembler-mips.h" #include "src/wasm/baseline/mips/liftoff-assembler-mips.h"
......
...@@ -358,7 +358,7 @@ void NativeModuleSerializer::WriteCode(const WasmCode* code, Writer* writer) { ...@@ -358,7 +358,7 @@ void NativeModuleSerializer::WriteCode(const WasmCode* code, Writer* writer) {
writer->WriteVector(code->source_positions()); writer->WriteVector(code->source_positions());
writer->WriteVector(Vector<byte>::cast(code->protected_instructions())); writer->WriteVector(Vector<byte>::cast(code->protected_instructions()));
#if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_ARM || \ #if V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_ARM || \
V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390X V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64 || V8_TARGET_ARCH_S390X
// On platforms that don't support misaligned word stores, copy to an aligned // On platforms that don't support misaligned word stores, copy to an aligned
// buffer if necessary so we can relocate the serialized code. // buffer if necessary so we can relocate the serialized code.
std::unique_ptr<byte[]> aligned_buffer; std::unique_ptr<byte[]> aligned_buffer;
......
...@@ -1069,7 +1069,7 @@ class CodeGeneratorTester { ...@@ -1069,7 +1069,7 @@ class CodeGeneratorTester {
CodeGeneratorTester::PushTypeFlag push_type) { CodeGeneratorTester::PushTypeFlag push_type) {
generator_->AssembleTailCallBeforeGap(instr, first_unused_stack_slot); generator_->AssembleTailCallBeforeGap(instr, first_unused_stack_slot);
#if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_S390) || \ #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_S390) || \
defined(V8_TARGET_ARCH_PPC) defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_PPC64)
// Only folding register pushes is supported on ARM. // Only folding register pushes is supported on ARM.
bool supported = ((push_type & CodeGenerator::kRegisterPush) == push_type); bool supported = ((push_type & CodeGenerator::kRegisterPush) == push_type);
#elif defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_IA32) || \ #elif defined(V8_TARGET_ARCH_X64) || defined(V8_TARGET_ARCH_IA32) || \
......
...@@ -350,7 +350,7 @@ TEST(SizeOfInitialHeap) { ...@@ -350,7 +350,7 @@ TEST(SizeOfInitialHeap) {
// snapshot. // snapshot.
// In PPC the page size is 64K, causing more internal fragmentation // In PPC the page size is 64K, causing more internal fragmentation
// hence requiring a larger limit. // hence requiring a larger limit.
#if V8_OS_LINUX && V8_HOST_ARCH_PPC #if V8_OS_LINUX && (V8_HOST_ARCH_PPC || V8_HOST_ARCH_PPC64)
const size_t kMaxInitialSizePerSpace = 3 * MB; const size_t kMaxInitialSizePerSpace = 3 * MB;
#else #else
const size_t kMaxInitialSizePerSpace = 2 * MB; const size_t kMaxInitialSizePerSpace = 2 * MB;
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
#if defined(V8_TARGET_ARCH_PPC) #if defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_PPC64)
const ConstantPoolEntry::Type kPtrType = ConstantPoolEntry::INTPTR; const ConstantPoolEntry::Type kPtrType = ConstantPoolEntry::INTPTR;
const ConstantPoolEntry::Type kDblType = ConstantPoolEntry::DOUBLE; const ConstantPoolEntry::Type kDblType = ConstantPoolEntry::DOUBLE;
...@@ -249,7 +249,7 @@ TEST(ConstantPoolNoSharing) { ...@@ -249,7 +249,7 @@ TEST(ConstantPoolNoSharing) {
CHECK_EQ(access, kOvflAccess); CHECK_EQ(access, kOvflAccess);
} }
#endif // defined(V8_TARGET_ARCH_PPC) #endif // defined(V8_TARGET_ARCH_PPC) || defined(V8_TARGET_ARCH_PPC64)
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
...@@ -51,7 +51,7 @@ static void FloodWithInc(Isolate* isolate, TestingAssemblerBuffer* buffer) { ...@@ -51,7 +51,7 @@ static void FloodWithInc(Isolate* isolate, TestingAssemblerBuffer* buffer) {
for (int i = 0; i < kNumInstr; ++i) { for (int i = 0; i < kNumInstr; ++i) {
__ Addu(v0, v0, Operand(1)); __ Addu(v0, v0, Operand(1));
} }
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
for (int i = 0; i < kNumInstr; ++i) { for (int i = 0; i < kNumInstr; ++i) {
__ addi(r3, r3, Operand(1)); __ addi(r3, r3, Operand(1));
} }
......
...@@ -607,7 +607,7 @@ using ArchRegExpMacroAssembler = RegExpMacroAssemblerARM; ...@@ -607,7 +607,7 @@ using ArchRegExpMacroAssembler = RegExpMacroAssemblerARM;
using ArchRegExpMacroAssembler = RegExpMacroAssemblerARM64; using ArchRegExpMacroAssembler = RegExpMacroAssemblerARM64;
#elif V8_TARGET_ARCH_S390 #elif V8_TARGET_ARCH_S390
using ArchRegExpMacroAssembler = RegExpMacroAssemblerS390; using ArchRegExpMacroAssembler = RegExpMacroAssemblerS390;
#elif V8_TARGET_ARCH_PPC #elif V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_PPC64
using ArchRegExpMacroAssembler = RegExpMacroAssemblerPPC; using ArchRegExpMacroAssembler = RegExpMacroAssemblerPPC;
#elif V8_TARGET_ARCH_MIPS #elif V8_TARGET_ARCH_MIPS
using ArchRegExpMacroAssembler = RegExpMacroAssemblerMIPS; using ArchRegExpMacroAssembler = RegExpMacroAssemblerMIPS;
......
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