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

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

Issue 12629004: Implement native call stub on ARM and native call redirection in ARM simulator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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/intermediate_language_arm.cc ('k') | runtime/vm/simulator_arm.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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/runtime_entry.h" 8 #include "vm/runtime_entry.h"
9 9
10 #include "vm/assembler.h" 10 #include "vm/assembler.h"
11 #include "vm/simulator.h" 11 #include "vm/simulator.h"
12 #include "vm/stub_code.h" 12 #include "vm/stub_code.h"
13 13
14 namespace dart { 14 namespace dart {
15 15
16 #define __ assembler-> 16 #define __ assembler->
17 17
18 18
19 // Generate code to call into the stub which will call the runtime 19 // Generate code to call into the stub which will call the runtime
20 // function. Input for the stub is as follows: 20 // function. Input for the stub is as follows:
21 // SP : points to the arguments and return value array. 21 // SP : points to the arguments and return value array.
22 // R5 : address of the runtime function to call. 22 // R5 : address of the runtime function to call.
23 // R4 : number of arguments to the call. 23 // R4 : number of arguments to the call.
24 void RuntimeEntry::Call(Assembler* assembler) const { 24 void RuntimeEntry::Call(Assembler* assembler) const {
25 // Compute the effective address. When running under the simulator, 25 // Compute the effective address. When running under the simulator,
26 // this is a redirection address that forces the simulator to call 26 // this is a redirection address that forces the simulator to call
27 // into the runtime system. 27 // into the runtime system.
28 uword entry = GetEntryPoint(); 28 uword entry = GetEntryPoint();
29 #if defined(USING_SIMULATOR) 29 #if defined(USING_SIMULATOR)
30 entry = Simulator::RedirectExternalReference(entry, argument_count()); 30 entry = Simulator::RedirectExternalReference(entry, Simulator::kRuntimeCall);
31 #endif 31 #endif
32 if (is_leaf()) { 32 if (is_leaf()) {
33 ExternalLabel label(name(), entry); 33 ExternalLabel label(name(), entry);
34 __ BranchLink(&label); 34 __ BranchLink(&label);
35 } else { 35 } else {
36 __ LoadImmediate(R5, entry); 36 __ LoadImmediate(R5, entry);
37 __ LoadImmediate(R4, argument_count()); 37 __ LoadImmediate(R4, argument_count());
38 __ BranchLink(&StubCode::CallToRuntimeLabel()); 38 __ BranchLink(&StubCode::CallToRuntimeLabel());
39 } 39 }
40 } 40 }
41 41
42 } // namespace dart 42 } // namespace dart
43 43
44 #endif // defined TARGET_ARCH_ARM 44 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/simulator_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698