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

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

Issue 1250323002: Load immediates via the constant pool on armv5te and armv6. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: address comments Created 5 years, 5 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_arm.cc ('k') | runtime/vm/intermediate_language_arm.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/instructions.h" 10 #include "vm/instructions.h"
11 #include "vm/stub_code.h" 11 #include "vm/stub_code.h"
12 #include "vm/unit_test.h" 12 #include "vm/unit_test.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 #define __ assembler-> 16 #define __ assembler->
17 17
18 ASSEMBLER_TEST_GENERATE(Call, assembler) { 18 ASSEMBLER_TEST_GENERATE(Call, assembler) {
19 // Code accessing pp is generated, but not executed. Uninitialized pp is OK.
20 __ set_constant_pool_allowed(true);
19 __ BranchLinkPatchable(&StubCode::InvokeDartCodeLabel()); 21 __ BranchLinkPatchable(&StubCode::InvokeDartCodeLabel());
20 __ Ret(); 22 __ Ret();
21 } 23 }
22 24
23 25
24 ASSEMBLER_TEST_RUN(Call, test) { 26 ASSEMBLER_TEST_RUN(Call, test) {
25 // The return address, which must be the address of an instruction contained 27 // The return address, which must be the address of an instruction contained
26 // in the code, points to the Ret instruction above, i.e. one instruction 28 // in the code, points to the Ret instruction above, i.e. one instruction
27 // before the end of the code buffer. 29 // before the end of the code buffer.
28 CallPattern call(test->entry() + test->code().Size() - Instr::kInstrSize, 30 CallPattern call(test->entry() + test->code().Size() - Instr::kInstrSize,
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 EXPECT_EQ(array_stub.EntryPoint(), jump1.TargetAddress()); 102 EXPECT_EQ(array_stub.EntryPoint(), jump1.TargetAddress());
101 EXPECT_EQ(StubCode::InvokeDartCodeLabel().address(), 103 EXPECT_EQ(StubCode::InvokeDartCodeLabel().address(),
102 jump2.TargetAddress()); 104 jump2.TargetAddress());
103 HostCPUFeatures::set_arm_version(ARMv7); 105 HostCPUFeatures::set_arm_version(ARMv7);
104 } 106 }
105 #endif 107 #endif
106 108
107 } // namespace dart 109 } // namespace dart
108 110
109 #endif // defined TARGET_ARCH_ARM 111 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698