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

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

Issue 267793005: Use xorps xmm1, xmm1 to creat a 0.0 cconstant. Add to utils a bitwise double test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/intermediate_language_ia32.cc ('k') | runtime/vm/utils_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) 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" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 235 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
236 locs->set_out(0, Location::RequiresFpuRegister()); 236 locs->set_out(0, Location::RequiresFpuRegister());
237 return locs; 237 return locs;
238 } 238 }
239 239
240 240
241 void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 241 void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
242 // The register allocator drops constant definitions that have no uses. 242 // The register allocator drops constant definitions that have no uses.
243 if (!locs()->out(0).IsInvalid()) { 243 if (!locs()->out(0).IsInvalid()) {
244 XmmRegister result = locs()->out(0).fpu_reg(); 244 XmmRegister result = locs()->out(0).fpu_reg();
245 __ LoadObject(TMP, value(), PP); 245 if (Utils::DoublesBitEqual(Double::Cast(value()).value(), 0.0)) {
246 __ movsd(result, FieldAddress(TMP, Double::value_offset())); 246 __ xorps(result, result);
247 } else {
248 __ LoadObject(TMP, value(), PP);
249 __ movsd(result, FieldAddress(TMP, Double::value_offset()));
250 }
247 } 251 }
248 } 252 }
249 253
250 254
251 LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const { 255 LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const {
252 const intptr_t kNumInputs = 3; 256 const intptr_t kNumInputs = 3;
253 const intptr_t kNumTemps = 0; 257 const intptr_t kNumTemps = 0;
254 LocationSummary* summary = 258 LocationSummary* summary =
255 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); 259 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
256 summary->set_in(0, Location::RegisterLocation(RAX)); // Value. 260 summary->set_in(0, Location::RegisterLocation(RAX)); // Value.
(...skipping 5351 matching lines...) Expand 10 before | Expand all | Expand 10 after
5608 PcDescriptors::kOther, 5612 PcDescriptors::kOther,
5609 locs()); 5613 locs());
5610 __ Drop(ArgumentCount()); // Discard arguments. 5614 __ Drop(ArgumentCount()); // Discard arguments.
5611 } 5615 }
5612 5616
5613 } // namespace dart 5617 } // namespace dart
5614 5618
5615 #undef __ 5619 #undef __
5616 5620
5617 #endif // defined TARGET_ARCH_X64 5621 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/utils_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698