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

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

Issue 10386152: Un revert the revert (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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_x64.h ('k') | runtime/vm/flow_graph_compiler_x64.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) 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_X64) 6 #if defined(TARGET_ARCH_X64)
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 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 value = -value; 1259 value = -value;
1260 if (value == 1) { 1260 if (value == 1) {
1261 decq(reg); 1261 decq(reg);
1262 } else if (value != 0) { 1262 } else if (value != 0) {
1263 subq(reg, Immediate(value)); 1263 subq(reg, Immediate(value));
1264 } 1264 }
1265 } 1265 }
1266 } 1266 }
1267 1267
1268 1268
1269 void Assembler::Drop(intptr_t stack_elements) {
1270 ASSERT(stack_elements >= 0);
1271 if (stack_elements > 0) {
1272 // TODO(fschneider): When optimizing for code size, we could
1273 // consider using pop for stack_elements < 4 instead.
1274 addq(RSP, Immediate(stack_elements * kWordSize));
1275 }
1276 }
1277
1278
1269 void Assembler::LoadObject(Register dst, const Object& object) { 1279 void Assembler::LoadObject(Register dst, const Object& object) {
1270 if (object.IsSmi()) { 1280 if (object.IsSmi()) {
1271 movq(dst, Immediate(reinterpret_cast<int64_t>(object.raw()))); 1281 movq(dst, Immediate(reinterpret_cast<int64_t>(object.raw())));
1272 } else { 1282 } else {
1273 ASSERT(object.IsZoneHandle()); 1283 ASSERT(object.IsZoneHandle());
1274 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1284 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1275 EmitRegisterREX(dst, REX_W); 1285 EmitRegisterREX(dst, REX_W);
1276 EmitUint8(0xB8 | (dst & 7)); 1286 EmitUint8(0xB8 | (dst & 7));
1277 buffer_.EmitObject(object); 1287 buffer_.EmitObject(object);
1278 } 1288 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1502 } else { 1512 } else {
1503 EmitRegisterREX(operand, REX_NONE); 1513 EmitRegisterREX(operand, REX_NONE);
1504 } 1514 }
1505 EmitUint8(0xD3); 1515 EmitUint8(0xD3);
1506 EmitOperand(rm, Operand(operand)); 1516 EmitOperand(rm, Operand(operand));
1507 } 1517 }
1508 1518
1509 } // namespace dart 1519 } // namespace dart
1510 1520
1511 #endif // defined TARGET_ARCH_X64 1521 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698