0fa243af70
Bug: v8:9247 Change-Id: I79e0553e8a0d6dac2aa16b94a6c0e05b6ccde4a1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1621934 Commit-Queue: Yang Guo <yangguo@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#61725}
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
// 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>
|
|
|
|
#include "src/execution/simulator.h"
|
|
#include "src/handles.h"
|
|
|
|
namespace v8 {
|
|
namespace internal {
|
|
|
|
// TODO(arm): Refine these signatures per test case, they can have arbitrary
|
|
// return and argument types and arbitrary number of arguments.
|
|
using F_iiiii = void*(int x, int p1, int p2, int p3, int p4);
|
|
using F_piiii = void*(void* p0, int p1, int p2, int p3, int p4);
|
|
using F_ppiii = void*(void* p0, void* p1, int p2, int p3, int p4);
|
|
using F_pppii = void*(void* p0, void* p1, void* p2, int p3, int p4);
|
|
using F_ippii = void*(int p0, void* p1, void* p2, int p3, int p4);
|
|
|
|
Handle<Code> AssembleCodeImpl(std::function<void(MacroAssembler&)> assemble);
|
|
|
|
template <typename Signature>
|
|
GeneratedCode<Signature> AssembleCode(
|
|
std::function<void(MacroAssembler&)> assemble) {
|
|
return GeneratedCode<Signature>::FromCode(*AssembleCodeImpl(assemble));
|
|
}
|
|
|
|
} // namespace internal
|
|
} // namespace v8
|
|
|
|
#endif // V8_CCTEST_ASSEMBLER_HELPER_ARM_H_
|