OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 const intptr_t kNumInputs = 0; | 289 const intptr_t kNumInputs = 0; |
290 return LocationSummary::Make(isolate, | 290 return LocationSummary::Make(isolate, |
291 kNumInputs, | 291 kNumInputs, |
292 Location::RequiresFpuRegister(), | 292 Location::RequiresFpuRegister(), |
293 LocationSummary::kNoCall); | 293 LocationSummary::kNoCall); |
294 } | 294 } |
295 | 295 |
296 | 296 |
297 void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 297 void UnboxedConstantInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
298 if (!locs()->out(0).IsInvalid()) { | 298 if (!locs()->out(0).IsInvalid()) { |
299 const VRegister dst = locs()->out(0).fpu_reg(); | 299 if (Utils::DoublesBitEqual(Double::Cast(value()).value(), 0.0)) { |
300 __ LoadDImmediate(dst, Double::Cast(value()).value(), PP); | 300 const VRegister dst = locs()->out(0).fpu_reg(); |
| 301 __ veor(dst, dst, dst); |
| 302 } else { |
| 303 const VRegister dst = locs()->out(0).fpu_reg(); |
| 304 __ LoadDImmediate(dst, Double::Cast(value()).value(), PP); |
| 305 } |
301 } | 306 } |
302 } | 307 } |
303 | 308 |
304 | 309 |
305 LocationSummary* AssertAssignableInstr::MakeLocationSummary(Isolate* isolate, | 310 LocationSummary* AssertAssignableInstr::MakeLocationSummary(Isolate* isolate, |
306 bool opt) const { | 311 bool opt) const { |
307 const intptr_t kNumInputs = 3; | 312 const intptr_t kNumInputs = 3; |
308 const intptr_t kNumTemps = 0; | 313 const intptr_t kNumTemps = 0; |
309 LocationSummary* summary = new(isolate) LocationSummary( | 314 LocationSummary* summary = new(isolate) LocationSummary( |
310 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); | 315 isolate, kNumInputs, kNumTemps, LocationSummary::kCall); |
(...skipping 5001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5312 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); | 5317 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); |
5313 #if defined(DEBUG) | 5318 #if defined(DEBUG) |
5314 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); | 5319 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); |
5315 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); | 5320 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); |
5316 #endif | 5321 #endif |
5317 } | 5322 } |
5318 | 5323 |
5319 } // namespace dart | 5324 } // namespace dart |
5320 | 5325 |
5321 #endif // defined TARGET_ARCH_ARM64 | 5326 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |