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

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

Issue 12545067: On x64 use 32bit idiv when possible instead of 64bit one. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix optimized pattern for kTRUNCDIV as well 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
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" 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 EmitUint8(0xC7); 358 EmitUint8(0xC7);
359 EmitOperand(0, operand); 359 EmitOperand(0, operand);
360 EmitImmediate(imm); 360 EmitImmediate(imm);
361 } else { 361 } else {
362 movq(TMP, imm); 362 movq(TMP, imm);
363 movq(dst, TMP); 363 movq(dst, TMP);
364 } 364 }
365 } 365 }
366 366
367 367
368 void Assembler::movsxl(Register dst, Register src) {
369 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
370 Operand operand(src);
371 EmitOperandREX(dst, operand, REX_W);
372 EmitUint8(0x63);
373 EmitOperand(dst & 7, operand);
374 }
375
376
368 void Assembler::movsxl(Register dst, const Address& src) { 377 void Assembler::movsxl(Register dst, const Address& src) {
369 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 378 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
370 EmitOperandREX(dst, src, REX_W); 379 EmitOperandREX(dst, src, REX_W);
371 EmitUint8(0x63); 380 EmitUint8(0x63);
372 EmitOperand(dst & 7, src); 381 EmitOperand(dst & 7, src);
373 } 382 }
374 383
375 384
376 void Assembler::leaq(Register dst, const Address& src) { 385 void Assembler::leaq(Register dst, const Address& src) {
377 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 386 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
(...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2494 2503
2495 const char* Assembler::FpuRegisterName(FpuRegister reg) { 2504 const char* Assembler::FpuRegisterName(FpuRegister reg) {
2496 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 2505 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
2497 return xmm_reg_names[reg]; 2506 return xmm_reg_names[reg];
2498 } 2507 }
2499 2508
2500 2509
2501 } // namespace dart 2510 } // namespace dart
2502 2511
2503 #endif // defined TARGET_ARCH_X64 2512 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698