Commit 3b5e84ab authored by jyan's avatar jyan Committed by Commit bot

S390: Initial test changes and files checkin.

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

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

Cr-Commit-Position: refs/heads/master@{#34795}
parent 0852060f
......@@ -236,6 +236,20 @@
'test-js-arm64-variables.cc'
],
}],
['v8_target_arch=="s390"', {
'sources': [ ### gcmole(arch:s390) ###
'test-assembler-s390.cc',
'test-code-stubs.cc',
'test-disasm-s390.cc'
],
}],
['v8_target_arch=="s390x"', {
'sources': [ ### gcmole(arch:s390x) ###
'test-assembler-s390.cc',
'test-code-stubs.cc',
'test-disasm-s390.cc'
],
}],
['v8_target_arch=="ppc"', {
'sources': [ ### gcmole(arch:ppc) ###
'test-assembler-ppc.cc',
......
......@@ -220,7 +220,8 @@ class CallHelper {
Simulator::CallArgument(p5), Simulator::CallArgument::End()};
return CastReturnValue<R>(CallSimulator(FUNCTION_ADDR(f), args));
}
#elif USE_SIMULATOR && (V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64)
#elif USE_SIMULATOR && \
(V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC64 || V8_TARGET_ARCH_S390X)
uintptr_t CallSimulator(byte* f, int64_t p1 = 0, int64_t p2 = 0,
int64_t p3 = 0, int64_t p4 = 0, int64_t p5 = 0) {
Simulator* simulator = Simulator::current(isolate_);
......@@ -264,8 +265,8 @@ class CallHelper {
ParameterTraits<P2>::Cast(p2), ParameterTraits<P3>::Cast(p3),
ParameterTraits<P4>::Cast(p4), ParameterTraits<P5>::Cast(p5)));
}
#elif USE_SIMULATOR && \
(V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_PPC)
#elif USE_SIMULATOR && (V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || \
V8_TARGET_ARCH_PPC || V8_TARGET_ARCH_S390)
uintptr_t CallSimulator(byte* f, int32_t p1 = 0, int32_t p2 = 0,
int32_t p3 = 0, int32_t p4 = 0, int32_t p5 = 0) {
Simulator* simulator = Simulator::current(isolate_);
......
This diff is collapsed.
This diff is collapsed.
......@@ -90,6 +90,15 @@ void generate(MacroAssembler* masm, uint32_t key) {
__ pop(kRootRegister);
__ jr(ra);
__ nop();
#elif V8_TARGET_ARCH_S390
__ push(kRootRegister);
__ push(ip);
__ InitializeRootRegister();
__ lhi(r2, Operand(key));
__ GetNumberHash(r2, ip);
__ pop(ip);
__ pop(kRootRegister);
__ Ret();
#elif V8_TARGET_ARCH_PPC
__ function_descriptor();
__ push(kRootRegister);
......
......@@ -298,7 +298,7 @@ class SeparateIsolatesLocksNonexclusiveThread : public JoinableThread {
// Run parallel threads that lock and access different isolates in parallel
TEST(SeparateIsolatesLocksNonexclusive) {
i::FLAG_always_opt = false;
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_S390
const int kNThreads = 50;
#else
const int kNThreads = 100;
......@@ -382,7 +382,7 @@ class LockerUnlockerThread : public JoinableThread {
// Use unlocker inside of a Locker, multiple threads.
TEST(LockerUnlocker) {
i::FLAG_always_opt = false;
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_S390
const int kNThreads = 50;
#else
const int kNThreads = 100;
......@@ -439,7 +439,7 @@ class LockTwiceAndUnlockThread : public JoinableThread {
// Use Unlocker inside two Lockers.
TEST(LockTwiceAndUnlock) {
i::FLAG_always_opt = false;
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_S390
const int kNThreads = 50;
#else
const int kNThreads = 100;
......@@ -710,6 +710,8 @@ TEST(ExtensionsRegistration) {
const int kNThreads = 10;
#elif V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT
const int kNThreads = 4;
#elif V8_TARGET_ARCH_S390 && V8_TARGET_ARCH_32_BIT
const int kNThreads = 10;
#else
const int kNThreads = 40;
#endif
......
......@@ -24,6 +24,10 @@ void GetStackPointer(const v8::FunctionCallbackInfo<v8::Value>& args) {
__asm__ __volatile__("sw $sp, %0" : "=g"(sp_addr));
#elif V8_HOST_ARCH_MIPS64
__asm__ __volatile__("sd $sp, %0" : "=g"(sp_addr));
#elif defined(__s390x__) || defined(_ARCH_S390X)
__asm__ __volatile__("stg 15, %0" : "=g"(sp_addr));
#elif defined(__s390__) || defined(_ARCH_S390)
__asm__ __volatile__("st 15, %0" : "=g"(sp_addr));
#elif defined(__PPC64__) || defined(_ARCH_PPC64)
__asm__ __volatile__("std 1, %0" : "=g"(sp_addr));
#elif defined(__PPC__) || defined(_ARCH_PPC)
......
......@@ -54,6 +54,11 @@
#include "src/arm64/macro-assembler-arm64.h"
#include "src/regexp/arm64/regexp-macro-assembler-arm64.h"
#endif
#if V8_TARGET_ARCH_S390
#include "src/regexp/s390/regexp-macro-assembler-s390.h"
#include "src/s390/assembler-s390.h"
#include "src/s390/macro-assembler-s390.h"
#endif
#if V8_TARGET_ARCH_PPC
#include "src/ppc/assembler-ppc.h"
#include "src/ppc/macro-assembler-ppc.h"
......@@ -744,6 +749,8 @@ typedef RegExpMacroAssemblerX64 ArchRegExpMacroAssembler;
typedef RegExpMacroAssemblerARM ArchRegExpMacroAssembler;
#elif V8_TARGET_ARCH_ARM64
typedef RegExpMacroAssemblerARM64 ArchRegExpMacroAssembler;
#elif V8_TARGET_ARCH_S390
typedef RegExpMacroAssemblerS390 ArchRegExpMacroAssembler;
#elif V8_TARGET_ARCH_PPC
typedef RegExpMacroAssemblerPPC ArchRegExpMacroAssembler;
#elif V8_TARGET_ARCH_MIPS
......
......@@ -71,6 +71,12 @@ class SimulatorHelper {
simulator_->get_register(v8::internal::Simulator::sp));
state->fp = reinterpret_cast<void*>(
simulator_->get_register(v8::internal::Simulator::fp));
#elif V8_TARGET_ARCH_S390 || V8_TARGET_ARCH_S390X
state->pc = reinterpret_cast<void*>(simulator_->get_pc());
state->sp = reinterpret_cast<void*>(
simulator_->get_register(v8::internal::Simulator::sp));
state->fp = reinterpret_cast<void*>(
simulator_->get_register(v8::internal::Simulator::fp));
#endif
}
......
......@@ -715,6 +715,16 @@
'harmony/symbols': [SKIP],
}], # 'arch == nacl_ia32 or arch == nacl_x64'
##############################################################################
['arch == s390 or arch == s390x', {
# Stack manipulations in LiveEdit is not implemented for this arch.
'debug-liveedit-check-stack': [SKIP],
'debug-liveedit-stack-padding': [SKIP],
'debug-liveedit-restart-frame': [SKIP],
'debug-liveedit-double-call': [SKIP],
}], # 'arch == s390 or arch == s390x'
##############################################################################
['deopt_fuzzer == True', {
......
// Copyright 2014 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.
#include "test/unittests/compiler/instruction-selector-unittest.h"
namespace v8 {
namespace internal {
namespace compiler {} // namespace compiler
} // namespace internal
} // namespace v8
......@@ -160,6 +160,11 @@
'compiler/ppc/instruction-selector-ppc-unittest.cc',
],
}],
['v8_target_arch=="s390" or v8_target_arch=="s390x"', {
'sources': [ ### gcmole(arch:s390) ###
'compiler/s390/instruction-selector-s390-unittest.cc',
],
}],
['OS=="aix"', {
'ldflags': [ '-Wl,-bbigtoc' ],
}],
......
......@@ -71,6 +71,8 @@ SUPPORTED_ARCHS = ["android_arm",
"ia32",
"ppc",
"ppc64",
"s390",
"s390x",
"mipsel",
"nacl_ia32",
"nacl_x64",
......
......@@ -175,6 +175,8 @@ SUPPORTED_ARCHS = ["android_arm",
"mips64el",
"nacl_ia32",
"nacl_x64",
"s390",
"s390x",
"ppc",
"ppc64",
"x64",
......
......@@ -59,7 +59,7 @@ for var in ["debug", "release", "big", "little",
"android_arm", "android_arm64", "android_ia32", "android_x87",
"android_x64", "arm", "arm64", "ia32", "mips", "mipsel", "mips64",
"mips64el", "x64", "x87", "nacl_ia32", "nacl_x64", "ppc", "ppc64",
"macos", "windows", "linux", "aix"]:
"s390", "s390x", "macos", "windows", "linux", "aix"]:
VARIABLES[var] = var
......
......@@ -102,6 +102,8 @@ def DefaultArch():
return 'ia32'
elif machine == 'amd64':
return 'ia32'
elif machine == 's390x':
return 's390'
elif machine == 'ppc64':
return 'ppc'
else:
......
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