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

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

Issue 221133002: Begins work on ARM64, first assembler test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Fixed Rn/Rd modes for R31 Created 6 years, 8 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
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/stub_code.h" 5 #include "vm/stub_code.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "platform/globals.h"
8 #include "vm/assembler.h" 9 #include "vm/assembler.h"
9 #include "vm/disassembler.h" 10 #include "vm/disassembler.h"
10 #include "vm/flags.h" 11 #include "vm/flags.h"
11 #include "vm/virtual_memory.h" 12 #include "vm/virtual_memory.h"
12 #include "vm/visitor.h" 13 #include "vm/visitor.h"
13 14
14 namespace dart { 15 namespace dart {
15 16
16 DEFINE_FLAG(bool, disassemble_stubs, false, "Disassemble generated stubs."); 17 DEFINE_FLAG(bool, disassemble_stubs, false, "Disassemble generated stubs.");
17 18
(...skipping 25 matching lines...) Expand all
43 #undef STUB_CODE_DELETER 44 #undef STUB_CODE_DELETER
44 } 45 }
45 46
46 47
47 #define STUB_CODE_GENERATE(name) \ 48 #define STUB_CODE_GENERATE(name) \
48 code ^= Generate("_stub_"#name, StubCode::Generate##name##Stub); \ 49 code ^= Generate("_stub_"#name, StubCode::Generate##name##Stub); \
49 name##_entry_ = new StubEntry("_stub_"#name, code); 50 name##_entry_ = new StubEntry("_stub_"#name, code);
50 51
51 52
52 void StubCode::InitOnce() { 53 void StubCode::InitOnce() {
54 #if !defined(TARGET_ARCH_ARM64)
regis 2014/04/01 19:52:53 Add TODO(zra)
zra 2014/04/01 20:35:08 Done.
53 // Generate all the stubs. 55 // Generate all the stubs.
54 Code& code = Code::Handle(); 56 Code& code = Code::Handle();
55 VM_STUB_CODE_LIST(STUB_CODE_GENERATE); 57 VM_STUB_CODE_LIST(STUB_CODE_GENERATE);
58 #endif
56 } 59 }
57 60
58 61
59 void StubCode::GenerateFor(Isolate* init) { 62 void StubCode::GenerateFor(Isolate* init) {
60 // Generate all the stubs. 63 // Generate all the stubs.
61 Code& code = Code::Handle(); 64 Code& code = Code::Handle();
62 STUB_CODE_LIST(STUB_CODE_GENERATE); 65 STUB_CODE_LIST(STUB_CODE_GENERATE);
63 } 66 }
64 67
65 #undef STUB_CODE_GENERATE 68 #undef STUB_CODE_GENERATE
66 69
67 70
68 void StubCode::Init(Isolate* isolate) { 71 void StubCode::Init(Isolate* isolate) {
72 #if !defined(TARGET_ARCH_ARM64)
regis 2014/04/01 19:52:53 ditto
zra 2014/04/01 20:35:08 Done.
69 StubCode* stubs = new StubCode(); 73 StubCode* stubs = new StubCode();
70 isolate->set_stub_code(stubs); 74 isolate->set_stub_code(stubs);
71 stubs->GenerateFor(isolate); 75 stubs->GenerateFor(isolate);
76 #endif
72 } 77 }
73 78
74 79
75 void StubCode::VisitObjectPointers(ObjectPointerVisitor* visitor) { 80 void StubCode::VisitObjectPointers(ObjectPointerVisitor* visitor) {
76 // The current isolate is needed as part of the macro. 81 // The current isolate is needed as part of the macro.
77 Isolate* isolate = Isolate::Current(); 82 Isolate* isolate = Isolate::Current();
78 StubCode* stubs = isolate->stub_code(); 83 StubCode* stubs = isolate->stub_code();
79 if (stubs == NULL) return; 84 if (stubs == NULL) return;
80 StubEntry* entry; 85 StubEntry* entry;
81 #define STUB_CODE_VISIT_OBJECT_POINTER(name) \ 86 #define STUB_CODE_VISIT_OBJECT_POINTER(name) \
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 VM_STUB_CODE_LIST(STUB_CODE_TESTER); 147 VM_STUB_CODE_LIST(STUB_CODE_TESTER);
143 Isolate* isolate = Isolate::Current(); 148 Isolate* isolate = Isolate::Current();
144 if ((isolate != NULL) && (isolate->stub_code() != NULL)) { 149 if ((isolate != NULL) && (isolate->stub_code() != NULL)) {
145 STUB_CODE_LIST(STUB_CODE_TESTER); 150 STUB_CODE_LIST(STUB_CODE_TESTER);
146 } 151 }
147 #undef STUB_CODE_TESTER 152 #undef STUB_CODE_TESTER
148 return NULL; 153 return NULL;
149 } 154 }
150 155
151 } // namespace dart 156 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698