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

Side by Side Diff: runtime/vm/intermediate_language_arm.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/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language_ia32.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); 283 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
284 locs->set_out(0, Location::RequiresFpuRegister()); 284 locs->set_out(0, Location::RequiresFpuRegister());
285 locs->set_temp(0, Location::RequiresRegister()); 285 locs->set_temp(0, Location::RequiresRegister());
286 return locs; 286 return locs;
287 } 287 }
288 288
289 289
290 void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 290 void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
291 // The register allocator drops constant definitions that have no uses. 291 // The register allocator drops constant definitions that have no uses.
292 if (!locs()->out(0).IsInvalid()) { 292 if (!locs()->out(0).IsInvalid()) {
293 DRegister dst = EvenDRegisterOf(locs()->out(0).fpu_reg()); 293 if (Utils::DoublesBitEqual(Double::Cast(value()).value(), 0.0)) {
294 Register temp = locs()->temp(0).reg(); 294 QRegister dst = locs()->out(0).fpu_reg();
295 __ LoadDImmediate(dst, Double::Cast(value()).value(), temp); 295 __ veorq(dst, dst, dst);
296 } else {
297 DRegister dst = EvenDRegisterOf(locs()->out(0).fpu_reg());
298 Register temp = locs()->temp(0).reg();
299 __ LoadDImmediate(dst, Double::Cast(value()).value(), temp);
300 }
296 } 301 }
297 } 302 }
298 303
299 304
300 LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const { 305 LocationSummary* AssertAssignableInstr::MakeLocationSummary(bool opt) const {
301 const intptr_t kNumInputs = 3; 306 const intptr_t kNumInputs = 3;
302 const intptr_t kNumTemps = 0; 307 const intptr_t kNumTemps = 0;
303 LocationSummary* summary = 308 LocationSummary* summary =
304 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall); 309 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kCall);
305 summary->set_in(0, Location::RegisterLocation(R0)); // Value. 310 summary->set_in(0, Location::RegisterLocation(R0)); // Value.
(...skipping 5777 matching lines...) Expand 10 before | Expand all | Expand 10 after
6083 compiler->GenerateCall(token_pos(), 6088 compiler->GenerateCall(token_pos(),
6084 &label, 6089 &label,
6085 PcDescriptors::kOther, 6090 PcDescriptors::kOther,
6086 locs()); 6091 locs());
6087 __ Drop(ArgumentCount()); // Discard arguments. 6092 __ Drop(ArgumentCount()); // Discard arguments.
6088 } 6093 }
6089 6094
6090 } // namespace dart 6095 } // namespace dart
6091 6096
6092 #endif // defined TARGET_ARCH_ARM 6097 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698