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

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

Issue 10916082: Make register allocator to disregard constant computation with no uses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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/assembler_x64_test.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 940
941 941
942 void Assembler::xorq(const Address& dst, Register src) { 942 void Assembler::xorq(const Address& dst, Register src) {
943 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 943 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
944 EmitOperandREX(src, dst, REX_W); 944 EmitOperandREX(src, dst, REX_W);
945 EmitUint8(0x31); 945 EmitUint8(0x31);
946 EmitOperand(src & 7, dst); 946 EmitOperand(src & 7, dst);
947 } 947 }
948 948
949 949
950 void Assembler::xorq(Register dst, const Immediate& imm) {
951 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
952 EmitRegisterREX(dst, REX_W);
953 EmitComplex(6, Operand(dst), imm);
954 }
955
956
950 void Assembler::addl(Register dst, Register src) { 957 void Assembler::addl(Register dst, Register src) {
951 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 958 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
952 Operand operand(src); 959 Operand operand(src);
953 EmitOperandREX(dst, operand, REX_NONE); 960 EmitOperandREX(dst, operand, REX_NONE);
954 EmitUint8(0x03); 961 EmitUint8(0x03);
955 EmitOperand(dst & 7, operand); 962 EmitOperand(dst & 7, operand);
956 } 963 }
957 964
958 965
959 void Assembler::addq(Register dst, Register src) { 966 void Assembler::addq(Register dst, Register src) {
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1968 1975
1969 const char* Assembler::XmmRegisterName(XmmRegister reg) { 1976 const char* Assembler::XmmRegisterName(XmmRegister reg) {
1970 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 1977 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
1971 return xmm_reg_names[reg]; 1978 return xmm_reg_names[reg];
1972 } 1979 }
1973 1980
1974 1981
1975 } // namespace dart 1982 } // namespace dart
1976 1983
1977 #endif // defined TARGET_ARCH_X64 1984 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/assembler_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698