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

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

Issue 12301042: Implement ARM disassembler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/instructions_arm.cc ('k') | runtime/vm/object.h » ('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/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 __ BranchLinkPatchable(&StubCode::InstanceFunctionLookupLabel()); 18 __ BranchLinkPatchable(&StubCode::InstanceFunctionLookupLabel());
19 __ Stop("Test should not be executed"); 19 // Do not emit any code after the call above, since we decode backwards
20 // starting from the return address, i.e. from the end of this code buffer.
20 } 21 }
21 22
22 23
23 ASSEMBLER_TEST_RUN(Call, test) { 24 ASSEMBLER_TEST_RUN(Call, test) {
24 CallPattern call(test->entry(), test->code()); 25 CallPattern call(test->entry() + test->code().Size(), test->code());
25 EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(), 26 EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(),
26 call.TargetAddress()); 27 call.TargetAddress());
27 } 28 }
28 29
29 30
30 ASSEMBLER_TEST_GENERATE(Jump, assembler) { 31 ASSEMBLER_TEST_GENERATE(Jump, assembler) {
31 UNIMPLEMENTED(); 32 UNIMPLEMENTED();
32 } 33 }
33 34
34 35
(...skipping 10 matching lines...) Expand all
45 jump2.SetTargetAddress(target1); 46 jump2.SetTargetAddress(target1);
46 EXPECT_EQ(StubCode::AllocateArrayLabel().address(), 47 EXPECT_EQ(StubCode::AllocateArrayLabel().address(),
47 jump1.TargetAddress()); 48 jump1.TargetAddress());
48 EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(), 49 EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(),
49 jump2.TargetAddress()); 50 jump2.TargetAddress());
50 } 51 }
51 52
52 } // namespace dart 53 } // namespace dart
53 54
54 #endif // defined TARGET_ARCH_ARM 55 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/instructions_arm.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698