Revert "Revert "[cctest] Clarify that tests for sync instructions are simulator specific""
This reverts commit 1feadfe81b7cc250df83cbf0b2fdfd17ac348cf8.
Reason for revert: Reland as bot stayed red after revert.
Original change's description:
> Revert "[cctest] Clarify that tests for sync instructions are simulator specific"
>
> This reverts commit 4013518fe3be92f0fbd043b09017f5eb8b8629d8.
>
> Reason for revert:
> https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress
>
> Original change's description:
> > [cctest] Clarify that tests for sync instructions are simulator specific
> >
> > Some tests were recently added to test-simulator-arm.cc, however this file is
> > meant for tests that are specific to the simulator and therefore are not written
> > to work on hardware. While this sounds surprising, the reason is that our simulation
> > of synchronisation instructions is more conservative than on hardware.
> >
> > To make this more clear, this patch renames the "test-simulator-arm{,64}.cc"
> > files to "test-sync-primitives-arm{,64}.cc", and moves the vneg and vabs tests
> > into "test-assembler-arm.cc" which is were tests that are garanteed to work in
> > either native or simulated environments live.
> >
> > Finally, take the opportunity to share a little bit of code.
> >
> > Bug: v8:6963
> > Change-Id: Ifb85d3671c823b9bba73d09f419536b089a4e87c
> > Reviewed-on: https://chromium-review.googlesource.com/749387
> > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> > Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> > Cr-Commit-Position: refs/heads/master@{#49073}
>
> TBR=clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
>
> Change-Id: I1bfb4e9c7c18b716f417a84b18a14cb2e1fa3a7a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:6963
> Reviewed-on: https://chromium-review.googlesource.com/750624
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49074}
TBR=machenbach@chromium.org,clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
Change-Id: I5af7bd3678758130534730a2f6f0b651b64c6956
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6963
Reviewed-on: https://chromium-review.googlesource.com/750903
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49075}
2017-11-02 13:11:29 +00:00
|
|
|
// Copyright 2017 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.
|
|
|
|
|
|
|
|
#ifndef V8_CCTEST_ASSEMBLER_HELPER_ARM_H_
|
|
|
|
#define V8_CCTEST_ASSEMBLER_HELPER_ARM_H_
|
|
|
|
|
|
|
|
#include <functional>
|
|
|
|
|
2018-01-09 09:50:34 +00:00
|
|
|
#include "src/handles.h"
|
|
|
|
#include "src/simulator.h"
|
Revert "Revert "[cctest] Clarify that tests for sync instructions are simulator specific""
This reverts commit 1feadfe81b7cc250df83cbf0b2fdfd17ac348cf8.
Reason for revert: Reland as bot stayed red after revert.
Original change's description:
> Revert "[cctest] Clarify that tests for sync instructions are simulator specific"
>
> This reverts commit 4013518fe3be92f0fbd043b09017f5eb8b8629d8.
>
> Reason for revert:
> https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress
>
> Original change's description:
> > [cctest] Clarify that tests for sync instructions are simulator specific
> >
> > Some tests were recently added to test-simulator-arm.cc, however this file is
> > meant for tests that are specific to the simulator and therefore are not written
> > to work on hardware. While this sounds surprising, the reason is that our simulation
> > of synchronisation instructions is more conservative than on hardware.
> >
> > To make this more clear, this patch renames the "test-simulator-arm{,64}.cc"
> > files to "test-sync-primitives-arm{,64}.cc", and moves the vneg and vabs tests
> > into "test-assembler-arm.cc" which is were tests that are garanteed to work in
> > either native or simulated environments live.
> >
> > Finally, take the opportunity to share a little bit of code.
> >
> > Bug: v8:6963
> > Change-Id: Ifb85d3671c823b9bba73d09f419536b089a4e87c
> > Reviewed-on: https://chromium-review.googlesource.com/749387
> > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> > Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> > Cr-Commit-Position: refs/heads/master@{#49073}
>
> TBR=clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
>
> Change-Id: I1bfb4e9c7c18b716f417a84b18a14cb2e1fa3a7a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:6963
> Reviewed-on: https://chromium-review.googlesource.com/750624
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49074}
TBR=machenbach@chromium.org,clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
Change-Id: I5af7bd3678758130534730a2f6f0b651b64c6956
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6963
Reviewed-on: https://chromium-review.googlesource.com/750903
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49075}
2017-11-02 13:11:29 +00:00
|
|
|
|
|
|
|
namespace v8 {
|
|
|
|
namespace internal {
|
|
|
|
|
2018-01-09 09:50:34 +00:00
|
|
|
// TODO(arm): Refine these signatures per test case, they can have arbitrary
|
|
|
|
// return and argument types and arbitrary number of arguments.
|
|
|
|
using F_iiiii = Object*(int x, int p1, int p2, int p3, int p4);
|
|
|
|
using F_piiii = Object*(void* p0, int p1, int p2, int p3, int p4);
|
|
|
|
using F_ppiii = Object*(void* p0, void* p1, int p2, int p3, int p4);
|
|
|
|
using F_pppii = Object*(void* p0, void* p1, void* p2, int p3, int p4);
|
|
|
|
using F_ippii = Object*(int p0, void* p1, void* p2, int p3, int p4);
|
|
|
|
|
|
|
|
Handle<Code> AssembleCodeImpl(std::function<void(Assembler&)> assemble);
|
|
|
|
|
|
|
|
template <typename Signature>
|
|
|
|
GeneratedCode<Signature> AssembleCode(
|
|
|
|
std::function<void(Assembler&)> assemble) {
|
|
|
|
return GeneratedCode<Signature>::FromCode(*AssembleCodeImpl(assemble));
|
|
|
|
}
|
Revert "Revert "[cctest] Clarify that tests for sync instructions are simulator specific""
This reverts commit 1feadfe81b7cc250df83cbf0b2fdfd17ac348cf8.
Reason for revert: Reland as bot stayed red after revert.
Original change's description:
> Revert "[cctest] Clarify that tests for sync instructions are simulator specific"
>
> This reverts commit 4013518fe3be92f0fbd043b09017f5eb8b8629d8.
>
> Reason for revert:
> https://build.chromium.org/p/client.v8.ports/builders/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress
>
> Original change's description:
> > [cctest] Clarify that tests for sync instructions are simulator specific
> >
> > Some tests were recently added to test-simulator-arm.cc, however this file is
> > meant for tests that are specific to the simulator and therefore are not written
> > to work on hardware. While this sounds surprising, the reason is that our simulation
> > of synchronisation instructions is more conservative than on hardware.
> >
> > To make this more clear, this patch renames the "test-simulator-arm{,64}.cc"
> > files to "test-sync-primitives-arm{,64}.cc", and moves the vneg and vabs tests
> > into "test-assembler-arm.cc" which is were tests that are garanteed to work in
> > either native or simulated environments live.
> >
> > Finally, take the opportunity to share a little bit of code.
> >
> > Bug: v8:6963
> > Change-Id: Ifb85d3671c823b9bba73d09f419536b089a4e87c
> > Reviewed-on: https://chromium-review.googlesource.com/749387
> > Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
> > Commit-Queue: Pierre Langlois <pierre.langlois@arm.com>
> > Cr-Commit-Position: refs/heads/master@{#49073}
>
> TBR=clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
>
> Change-Id: I1bfb4e9c7c18b716f417a84b18a14cb2e1fa3a7a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:6963
> Reviewed-on: https://chromium-review.googlesource.com/750624
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Commit-Queue: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#49074}
TBR=machenbach@chromium.org,clemensh@chromium.org,pierre.langlois@arm.com,bmeurer@chromium.org
Change-Id: I5af7bd3678758130534730a2f6f0b651b64c6956
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:6963
Reviewed-on: https://chromium-review.googlesource.com/750903
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49075}
2017-11-02 13:11:29 +00:00
|
|
|
|
|
|
|
} // namespace internal
|
|
|
|
} // namespace v8
|
|
|
|
|
|
|
|
#endif // V8_CCTEST_ASSEMBLER_HELPER_ARM_H_
|