Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Side by Side Diff: runtime/vm/instructions_x64_test.cc

Issue 1268783003: Simplify constant pool usage in x64 code generator (by removing extra argument (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/instructions.h" 9 #include "vm/instructions.h"
10 #include "vm/stub_code.h" 10 #include "vm/stub_code.h"
11 #include "vm/unit_test.h" 11 #include "vm/unit_test.h"
12 12
13 namespace dart { 13 namespace dart {
14 14
15 #define __ assembler-> 15 #define __ assembler->
16 16
17 ASSEMBLER_TEST_GENERATE(Call, assembler) { 17 ASSEMBLER_TEST_GENERATE(Call, assembler) {
18 __ call(&StubCode::InvokeDartCodeLabel()); 18 __ call(&StubCode::InvokeDartCodeLabel());
19 __ ret(); 19 __ ret();
20 } 20 }
21 21
22 22
23 static intptr_t prologue_code_size = -1; 23 static intptr_t prologue_code_size = -1;
24 24
25 25
26 ASSEMBLER_TEST_GENERATE(Jump, assembler) { 26 ASSEMBLER_TEST_GENERATE(Jump, assembler) {
27 ASSERT(assembler->CodeSize() == 0); 27 ASSERT(assembler->CodeSize() == 0);
28 __ pushq(PP); 28 __ pushq(PP);
29 __ LoadPoolPointer(PP); 29 __ LoadPoolPointer();
30 prologue_code_size = assembler->CodeSize(); 30 prologue_code_size = assembler->CodeSize();
31 __ JmpPatchable(&StubCode::InvokeDartCodeLabel(), PP); 31 __ JmpPatchable(&StubCode::InvokeDartCodeLabel(), PP);
32 const ExternalLabel array_label(StubCode::AllocateArrayEntryPoint()); 32 const ExternalLabel array_label(StubCode::AllocateArrayEntryPoint());
33 __ JmpPatchable(&array_label, PP); 33 __ JmpPatchable(&array_label, PP);
34 __ popq(PP); 34 __ popq(PP);
35 __ ret(); 35 __ ret();
36 } 36 }
37 37
38 38
39 ASSEMBLER_TEST_RUN(Jump, test) { 39 ASSEMBLER_TEST_RUN(Jump, test) {
(...skipping 20 matching lines...) Expand all
60 jump1.SetTargetAddress(target2); 60 jump1.SetTargetAddress(target2);
61 jump2.SetTargetAddress(target1); 61 jump2.SetTargetAddress(target1);
62 EXPECT_EQ(array_stub.EntryPoint(), jump1.TargetAddress()); 62 EXPECT_EQ(array_stub.EntryPoint(), jump1.TargetAddress());
63 EXPECT_EQ(StubCode::InvokeDartCodeLabel().address(), 63 EXPECT_EQ(StubCode::InvokeDartCodeLabel().address(),
64 jump2.TargetAddress()); 64 jump2.TargetAddress());
65 } 65 }
66 66
67 } // namespace dart 67 } // namespace dart
68 68
69 #endif // defined TARGET_ARCH_X64 69 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698