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

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

Issue 10458050: Move ReturnInstr to new scheme (x64 and ia32) and implement more code in new ia32 compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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/assembler_ia32.h ('k') | runtime/vm/flow_graph_compiler_ia32.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_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/heap.h" 9 #include "vm/heap.h"
10 #include "vm/memory_region.h" 10 #include "vm/memory_region.h"
(...skipping 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 value = -value; 1293 value = -value;
1294 if (value == 1) { 1294 if (value == 1) {
1295 decl(reg); 1295 decl(reg);
1296 } else if (value != 0) { 1296 } else if (value != 0) {
1297 subl(reg, Immediate(value)); 1297 subl(reg, Immediate(value));
1298 } 1298 }
1299 } 1299 }
1300 } 1300 }
1301 1301
1302 1302
1303 void Assembler::Drop(intptr_t stack_elements) {
1304 if (stack_elements > 0) {
1305 addl(ESP, Immediate(stack_elements * kWordSize));
1306 }
1307 }
1308
1309
1303 void Assembler::LoadObject(Register dst, const Object& object) { 1310 void Assembler::LoadObject(Register dst, const Object& object) {
1304 if (object.IsSmi()) { 1311 if (object.IsSmi()) {
1305 movl(dst, Immediate(reinterpret_cast<int32_t>(object.raw()))); 1312 movl(dst, Immediate(reinterpret_cast<int32_t>(object.raw())));
1306 } else { 1313 } else {
1307 ASSERT(object.IsZoneHandle()); 1314 ASSERT(object.IsZoneHandle());
1308 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1315 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1309 EmitUint8(0xB8 + dst); 1316 EmitUint8(0xB8 + dst);
1310 buffer_.EmitObject(object); 1317 buffer_.EmitObject(object);
1311 } 1318 }
1312 } 1319 }
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
1616 comments.SetCommentAt(i, comments_[i]->comment()); 1623 comments.SetCommentAt(i, comments_[i]->comment());
1617 } 1624 }
1618 1625
1619 return comments; 1626 return comments;
1620 } 1627 }
1621 1628
1622 1629
1623 } // namespace dart 1630 } // namespace dart
1624 1631
1625 #endif // defined TARGET_ARCH_IA32 1632 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/flow_graph_compiler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698