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

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

Issue 385563004: Uses a conditional move for usage counter increment instead of a branch (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 447
448 448
449 void Assembler::leaq(Register dst, const Address& src) { 449 void Assembler::leaq(Register dst, const Address& src) {
450 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 450 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
451 EmitOperandREX(dst, src, REX_W); 451 EmitOperandREX(dst, src, REX_W);
452 EmitUint8(0x8D); 452 EmitUint8(0x8D);
453 EmitOperand(dst & 7, src); 453 EmitOperand(dst & 7, src);
454 } 454 }
455 455
456 456
457 void Assembler::cmovnoq(Register dst, Register src) {
458 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
459 Operand operand(src);
460 EmitOperandREX(dst, operand, REX_W);
461 EmitUint8(0x0F);
462 EmitUint8(0x41);
463 EmitOperand(dst & 7, operand);
464 }
465
466
457 void Assembler::cmoveq(Register dst, Register src) { 467 void Assembler::cmoveq(Register dst, Register src) {
458 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 468 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
459 Operand operand(src); 469 Operand operand(src);
460 EmitOperandREX(dst, operand, REX_W); 470 EmitOperandREX(dst, operand, REX_W);
461 EmitUint8(0x0F); 471 EmitUint8(0x0F);
462 EmitUint8(0x44); 472 EmitUint8(0x44);
463 EmitOperand(dst & 7, operand); 473 EmitOperand(dst & 7, operand);
464 } 474 }
465 475
466 476
(...skipping 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after
3385 3395
3386 3396
3387 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3397 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3388 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3398 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3389 return xmm_reg_names[reg]; 3399 return xmm_reg_names[reg];
3390 } 3400 }
3391 3401
3392 } // namespace dart 3402 } // namespace dart
3393 3403
3394 #endif // defined TARGET_ARCH_X64 3404 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698