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

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

Issue 13407003: Third codegen test passing for simulated MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/intermediate_language_mips.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" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/constants_mips.h" 8 #include "vm/constants_mips.h"
9 #include "vm/instructions.h" 9 #include "vm/instructions.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 ASSERT(target_address_pool_index_ >= 0); 143 ASSERT(target_address_pool_index_ >= 0);
144 const Object& target_address = 144 const Object& target_address =
145 Object::Handle(object_pool_.At(target_address_pool_index_)); 145 Object::Handle(object_pool_.At(target_address_pool_index_));
146 ASSERT(target_address.IsSmi()); 146 ASSERT(target_address.IsSmi());
147 // The address is stored in the object array as a RawSmi. 147 // The address is stored in the object array as a RawSmi.
148 return reinterpret_cast<uword>(target_address.raw()); 148 return reinterpret_cast<uword>(target_address.raw());
149 } 149 }
150 150
151 151
152 void CallPattern::SetTargetAddress(uword target_address) const { 152 void CallPattern::SetTargetAddress(uword target_address) const {
153 UNIMPLEMENTED(); 153 ASSERT(Utils::IsAligned(target_address, 4));
154 // The address is stored in the object array as a RawSmi.
155 const Smi& smi = Smi::Handle(reinterpret_cast<RawSmi*>(target_address));
156 object_pool_.SetAt(target_address_pool_index_, smi);
157 // No need to flush the instruction cache, since the code is not modified.
154 } 158 }
155 159
156 160
157 JumpPattern::JumpPattern(uword pc) : pc_(pc) { } 161 JumpPattern::JumpPattern(uword pc) : pc_(pc) { }
158 162
159 163
160 bool JumpPattern::IsValid() const { 164 bool JumpPattern::IsValid() const {
161 UNIMPLEMENTED(); 165 UNIMPLEMENTED();
162 return false; 166 return false;
163 } 167 }
164 168
165 169
166 uword JumpPattern::TargetAddress() const { 170 uword JumpPattern::TargetAddress() const {
167 UNIMPLEMENTED(); 171 UNIMPLEMENTED();
168 return 0; 172 return 0;
169 } 173 }
170 174
171 175
172 void JumpPattern::SetTargetAddress(uword target_address) const { 176 void JumpPattern::SetTargetAddress(uword target_address) const {
173 UNIMPLEMENTED(); 177 UNIMPLEMENTED();
174 } 178 }
175 179
176 } // namespace dart 180 } // namespace dart
177 181
178 #endif // defined TARGET_ARCH_MIPS 182 #endif // defined TARGET_ARCH_MIPS
179 183
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_mips.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698