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

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

Issue 1096573003: Reduce instruction size on X64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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 | « no previous file | no next file » | 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" // NOLINT 5 #include "vm/globals.h" // NOLINT
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 2537 matching lines...) Expand 10 before | Expand all | Expand 10 after
2548 } else { 2548 } else {
2549 EmitUint8(0x0F); 2549 EmitUint8(0x0F);
2550 EmitUint8(0x80 + condition); 2550 EmitUint8(0x80 + condition);
2551 EmitLabelLink(label); 2551 EmitLabelLink(label);
2552 } 2552 }
2553 } 2553 }
2554 2554
2555 2555
2556 void Assembler::j(Condition condition, const ExternalLabel* label) { 2556 void Assembler::j(Condition condition, const ExternalLabel* label) {
2557 Label no_jump; 2557 Label no_jump;
2558 j(static_cast<Condition>(condition ^ 1), &no_jump); // Negate condition. 2558 // Negate condition.
2559 j(static_cast<Condition>(condition ^ 1), &no_jump, Assembler::kNearJump);
2559 jmp(label); 2560 jmp(label);
2560 Bind(&no_jump); 2561 Bind(&no_jump);
2561 } 2562 }
2562 2563
2563 2564
2564 void Assembler::J(Condition condition, const ExternalLabel* label, 2565 void Assembler::J(Condition condition, const ExternalLabel* label,
2565 Register pp) { 2566 Register pp) {
2566 Label no_jump; 2567 Label no_jump;
2567 j(static_cast<Condition>(condition ^ 1), &no_jump); // Negate condition. 2568 // Negate condition.
2569 j(static_cast<Condition>(condition ^ 1), &no_jump, Assembler::kNearJump);
2568 Jmp(label, pp); 2570 Jmp(label, pp);
2569 Bind(&no_jump); 2571 Bind(&no_jump);
2570 } 2572 }
2571 2573
2572 2574
2573 void Assembler::jmp(Register reg) { 2575 void Assembler::jmp(Register reg) {
2574 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 2576 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
2575 Operand operand(reg); 2577 Operand operand(reg);
2576 EmitOperandREX(4, operand, REX_NONE); 2578 EmitOperandREX(4, operand, REX_NONE);
2577 EmitUint8(0xFF); 2579 EmitUint8(0xFF);
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
3917 3919
3918 3920
3919 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3921 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3920 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3922 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3921 return xmm_reg_names[reg]; 3923 return xmm_reg_names[reg];
3922 } 3924 }
3923 3925
3924 } // namespace dart 3926 } // namespace dart
3925 3927
3926 #endif // defined TARGET_ARCH_X64 3928 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698