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 | |
8 | #include "vm/compiler/assembler/assembler.h" |
9 | #include "vm/instructions.h" |
10 | #include "vm/stub_code.h" |
11 | #include "vm/unit_test.h" |
12 | |
13 | namespace dart { |
14 | |
15 | #define __ assembler-> |
16 | |
17 | ASSEMBLER_TEST_GENERATE(Call, assembler) { |
18 | __ Call(StubCode::InvokeDartCode()); |
19 | __ ret(); |
20 | } |
21 | |
22 | static intptr_t prologue_code_size = -1; |
23 | |
24 | ASSEMBLER_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 |
38 |