Revert "Reland "[arm] [simulator] Do also execute tests on real hardware""
This reverts commitf77d98f755
. Reason for revert: Still fails: https://build.chromium.org/p/client.v8.ports/builders/V8%20Arm/builds/4978 Original change's description: > Reland "[arm] [simulator] Do also execute tests on real hardware" > > This is a reland of8bacd8486b
. > The failing test is disabled if not executing in the simulator. > > Original change's description: > > [arm] [simulator] Do also execute tests on real hardware > > > > In order to avoid writing tests that *only* pass in the simulator, but > > not on real hardware, do also execute the simulator tests on real > > hardware. > > > > R=ahaas@chromium.org, rodolph.perfetta@arm.com > > > > Bug: v8:6947 > > Change-Id: Ibdf1719fff20e17620c0aaa343d7ea28e48f3837 > > Reviewed-on: https://chromium-review.googlesource.com/722961 > > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > > Reviewed-by: Rodolph Perfetta <rodolph.perfetta@arm.com> > > Reviewed-by: Andreas Haas <ahaas@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#48706} > > Bug: v8:6947, v8:6963 > Change-Id: I5733794bc5ca223c8e66afcdeb8414b1b4121314 > Reviewed-on: https://chromium-review.googlesource.com/727880 > Commit-Queue: Clemens Hammacher <clemensh@chromium.org> > Reviewed-by: Andreas Haas <ahaas@chromium.org> > Cr-Commit-Position: refs/heads/master@{#48734} TBR=rodolph.perfetta@arm.com,ahaas@chromium.org,clemensh@chromium.org Change-Id: I0ed35fc9e1dd5d30b0871479d17f0678fec17499 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: v8:6947, v8:6963 Reviewed-on: https://chromium-review.googlesource.com/727903 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#48743}
This commit is contained in:
parent
71bcc1d960
commit
e291c6913e
@ -38,13 +38,15 @@
|
||||
namespace v8 {
|
||||
namespace internal {
|
||||
|
||||
#if defined(USE_SIMULATOR)
|
||||
|
||||
#ifndef V8_TARGET_LITTLE_ENDIAN
|
||||
#error Expected ARM to be little-endian
|
||||
#endif
|
||||
|
||||
// Define these function prototypes to match JSEntryFunction in execution.cc.
|
||||
typedef Object* (*F_iiiii)(int p0, int p1, int p2, int p3, int p4);
|
||||
typedef Object* (*F_piiii)(void* p0, int p1, int p2, int p3, int p4);
|
||||
typedef Object* (*F1)(int x, int p1, int p2, int p3, int p4);
|
||||
typedef Object* (*F3)(void* p0, int p1, int p2, int p3, int p4);
|
||||
|
||||
#define __ assm.
|
||||
|
||||
@ -168,22 +170,6 @@ void AssembleMemoryAccess(Assembler* assembler, MemoryAccess access,
|
||||
}
|
||||
}
|
||||
|
||||
Address AssembleCode(std::function<void(Assembler&)> assemble) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
Assembler assm(isolate, nullptr, 0);
|
||||
|
||||
assemble(assm);
|
||||
|
||||
__ bx(lr);
|
||||
|
||||
CodeDesc desc;
|
||||
assm.GetCode(isolate, &desc);
|
||||
Handle<Code> code =
|
||||
isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
|
||||
return code->entry();
|
||||
}
|
||||
|
||||
#if defined(USE_SIMULATOR)
|
||||
void AssembleLoadExcl(Assembler* assembler, MemoryAccess access,
|
||||
Register value_reg, Register addr_reg) {
|
||||
DCHECK(access.kind == MemoryAccess::Kind::LoadExcl);
|
||||
@ -197,17 +183,33 @@ void AssembleStoreExcl(Assembler* assembler, MemoryAccess access,
|
||||
AssembleMemoryAccess(assembler, access, dest_reg, value_reg, addr_reg);
|
||||
}
|
||||
|
||||
F3 AssembleCode(std::function<void(Assembler&)> assemble) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
Assembler assm(isolate, nullptr, 0);
|
||||
|
||||
assemble(assm);
|
||||
|
||||
__ bx(lr);
|
||||
|
||||
CodeDesc desc;
|
||||
assm.GetCode(isolate, &desc);
|
||||
Handle<Code> code =
|
||||
isolate->factory()->NewCode(desc, Code::STUB, Handle<Code>());
|
||||
F3 f = FUNCTION_CAST<F3>(code->entry());
|
||||
return f;
|
||||
}
|
||||
|
||||
void TestInvalidateExclusiveAccess(TestData initial_data, MemoryAccess access1,
|
||||
MemoryAccess access2, MemoryAccess access3,
|
||||
int expected_res, TestData expected_data) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
F_piiii f = FUNCTION_CAST<F_piiii>(AssembleCode([&](Assembler& assm) {
|
||||
F3 f = AssembleCode([&](Assembler& assm) {
|
||||
AssembleLoadExcl(&assm, access1, r1, r1);
|
||||
AssembleMemoryAccess(&assm, access2, r3, r2, r1);
|
||||
AssembleStoreExcl(&assm, access3, r0, r3, r1);
|
||||
}));
|
||||
});
|
||||
|
||||
TestData t = initial_data;
|
||||
|
||||
@ -228,7 +230,6 @@ void TestInvalidateExclusiveAccess(TestData initial_data, MemoryAccess access1,
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
std::vector<Float32> Float32Inputs() {
|
||||
std::vector<Float32> inputs;
|
||||
@ -250,10 +251,6 @@ std::vector<Float64> Float64Inputs() {
|
||||
|
||||
} // namespace
|
||||
|
||||
// TODO(rodolph.perfetta@arm.com): Enable this test for native hardware, see
|
||||
// http://crbug.com/v8/6963.
|
||||
#if defined(USE_SIMULATOR)
|
||||
|
||||
TEST(simulator_invalidate_exclusive_access) {
|
||||
using Kind = MemoryAccess::Kind;
|
||||
using Size = MemoryAccess::Size;
|
||||
@ -290,14 +287,12 @@ TEST(simulator_invalidate_exclusive_access) {
|
||||
0, TestData(7));
|
||||
}
|
||||
|
||||
#endif // USE_SIMULATOR
|
||||
|
||||
static int ExecuteMemoryAccess(Isolate* isolate, TestData* test_data,
|
||||
MemoryAccess access) {
|
||||
HandleScope scope(isolate);
|
||||
F_piiii f = FUNCTION_CAST<F_piiii>(AssembleCode([&](Assembler& assm) {
|
||||
F3 f = AssembleCode([&](Assembler& assm) {
|
||||
AssembleMemoryAccess(&assm, access, r0, r2, r1);
|
||||
}));
|
||||
});
|
||||
|
||||
return reinterpret_cast<int>(
|
||||
CALL_GENERATED_CODE(isolate, f, test_data, 0, 0, 0, 0));
|
||||
@ -428,11 +423,11 @@ TEST(simulator_vabs_32) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
F_iiiii f = FUNCTION_CAST<F_iiiii>(AssembleCode([](Assembler& assm) {
|
||||
F3 f = AssembleCode([](Assembler& assm) {
|
||||
__ vmov(s0, r0);
|
||||
__ vabs(s0, s0);
|
||||
__ vmov(r0, s0);
|
||||
}));
|
||||
});
|
||||
|
||||
for (Float32 f32 : Float32Inputs()) {
|
||||
Float32 res = Float32::FromBits(reinterpret_cast<uint32_t>(
|
||||
@ -446,11 +441,11 @@ TEST(simulator_vabs_64) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
F_iiiii f = FUNCTION_CAST<F_iiiii>(AssembleCode([](Assembler& assm) {
|
||||
F3 f = AssembleCode([](Assembler& assm) {
|
||||
__ vmov(d0, r0, r1);
|
||||
__ vabs(d0, d0);
|
||||
__ vmov(r1, r0, d0);
|
||||
}));
|
||||
});
|
||||
|
||||
for (Float64 f64 : Float64Inputs()) {
|
||||
uint32_t p0 = static_cast<uint32_t>(f64.get_bits());
|
||||
@ -467,11 +462,11 @@ TEST(simulator_vneg_32) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
F_iiiii f = FUNCTION_CAST<F_iiiii>(AssembleCode([](Assembler& assm) {
|
||||
F3 f = AssembleCode([](Assembler& assm) {
|
||||
__ vmov(s0, r0);
|
||||
__ vneg(s0, s0);
|
||||
__ vmov(r0, s0);
|
||||
}));
|
||||
});
|
||||
|
||||
for (Float32 f32 : Float32Inputs()) {
|
||||
Float32 res = Float32::FromBits(reinterpret_cast<uint32_t>(
|
||||
@ -485,11 +480,11 @@ TEST(simulator_vneg_64) {
|
||||
Isolate* isolate = CcTest::i_isolate();
|
||||
HandleScope scope(isolate);
|
||||
|
||||
F_iiiii f = FUNCTION_CAST<F_iiiii>(AssembleCode([](Assembler& assm) {
|
||||
F3 f = AssembleCode([](Assembler& assm) {
|
||||
__ vmov(d0, r0, r1);
|
||||
__ vneg(d0, d0);
|
||||
__ vmov(r1, r0, d0);
|
||||
}));
|
||||
});
|
||||
|
||||
for (Float64 f64 : Float64Inputs()) {
|
||||
uint32_t p0 = static_cast<uint32_t>(f64.get_bits());
|
||||
@ -504,5 +499,7 @@ TEST(simulator_vneg_64) {
|
||||
|
||||
#undef __
|
||||
|
||||
#endif // USE_SIMULATOR
|
||||
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
Loading…
Reference in New Issue
Block a user