Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
instructions_x64_test.cc
Go to the documentation of this file.
1// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#include "vm/globals.h"
6#if defined(TARGET_ARCH_X64)
7
9#include "vm/instructions.h"
10#include "vm/stub_code.h"
11#include "vm/unit_test.h"
12
13namespace dart {
14
15#define __ assembler->
16
17ASSEMBLER_TEST_GENERATE(Call, assembler) {
18 __ Call(StubCode::InvokeDartCode());
19 __ ret();
20}
21
22static intptr_t prologue_code_size = -1;
23
24ASSEMBLER_TEST_GENERATE(Jump, assembler) {
25 ASSERT(assembler->CodeSize() == 0);
26 __ pushq(PP);
27 __ LoadPoolPointer();
28 prologue_code_size = assembler->CodeSize();
29 __ JmpPatchable(StubCode::InvokeDartCode(), PP);
30 __ JmpPatchable(StubCode::AllocateArray(), PP);
31 __ popq(PP);
32 __ ret();
33}
34
35} // namespace dart
36
37#endif // defined TARGET_ARCH_X64
#define __
#define ASSERT(E)
const Register PP
#define ASSEMBLER_TEST_GENERATE(name, assembler)
Definition unit_test.h:89